File libsoup2-CVE-2026-1761.patch of Package libsoup2

Index: libsoup-2.74.3/libsoup/soup-filter-input-stream.c
===================================================================
--- libsoup-2.74.3.orig/libsoup/soup-filter-input-stream.c
+++ libsoup-2.74.3/libsoup/soup-filter-input-stream.c
@@ -272,6 +272,6 @@ soup_filter_input_stream_read_until (Sou
 	if (eof && !*got_boundary)
 		read_length = MIN (fstream->priv->buf->len, length);
 	else
-		read_length = p - buf;
+		read_length = MIN ((gsize)(p - buf), length);
 	return read_from_buf (fstream, buffer, read_length);
 }
openSUSE Build Service is sponsored by