File libsoup2-CVE-2026-2369.patch of Package libsoup2
diff -urp libsoup-2.74.3.orig/libsoup/soup-content-sniffer.c libsoup-2.74.3/libsoup/soup-content-sniffer.c
--- libsoup-2.74.3.orig/libsoup/soup-content-sniffer.c 2022-10-11 13:27:22.000000000 -0500
+++ libsoup-2.74.3/libsoup/soup-content-sniffer.c 2026-02-14 07:38:14.229419082 -0600
@@ -499,6 +499,10 @@ sniff_unknown (SoupContentSniffer *sniff
if (!sniff_scriptable && type_row->scriptable)
continue;
+ /* Ensure we have data to sniff - prevents underflow in resource_length - 1 */
+ if (resource_length == 0)
+ continue;
+
if (type_row->has_ws) {
guint index_stream = 0;
guint index_pattern = 0;