public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Holy <oholy@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libsoup3] rawhide: Fix test failures on aarch64
Date: Wed, 24 Jun 2026 07:35:30 GMT [thread overview]
Message-ID: <178228653018.1.14606708542701366340.rpms-libsoup3-9fbcdc520f70@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/libsoup3
Branch : rawhide
Commit : 9fbcdc520f709dba85a705c4ebfa1cc0ce08f6a9
Author : Ondrej Holy <oholy@redhat.com>
Date : 2026-06-24T08:28:23+02:00
Stats : +84/-0 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/libsoup3/c/9fbcdc520f709dba85a705c4ebfa1cc0ce08f6a9?branch=rawhide
Log:
Fix test failures on aarch64
Backport of https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/538
that fixes buffer overread in soup-body-input-stream and multipart test
cleanup to deal with test failures on aarch64.
---
diff --git a/libsoup3.spec b/libsoup3.spec
index 0ebb93e..64d77df 100644
--- a/libsoup3.spec
+++ b/libsoup3.spec
@@ -21,6 +21,11 @@ Patch: no-ntlm-in-fips-mode.patch
# https://gitlab.gnome.org/GNOME/libsoup/-/work_items/530
Patch: skip-logger-test-on-32bit.patch
+# Fix test failures on aarch64
+# https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/538
+Patch: soup-body-input-stream-limit-buffer-read-to-the-received-content.patch
+Patch: multipart-test-close-base-stream-and-unref-multipart-before-quitting-main-loop.patch
+
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: glib-networking >= %{glib2_version}
diff --git a/multipart-test-close-base-stream-and-unref-multipart-before-quitting-main-loop.patch b/multipart-test-close-base-stream-and-unref-multipart-before-quitting-main-loop.patch
new file mode 100644
index 0000000..fb206d1
--- /dev/null
+++ b/multipart-test-close-base-stream-and-unref-multipart-before-quitting-main-loop.patch
@@ -0,0 +1,50 @@
+From 19b81b655f309026e5c76ddc18aee687f14636e4 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Tue, 23 Jun 2026 08:47:51 +0200
+Subject: [PATCH] multipart-test: Close base stream and unref multipart before
+ quitting main loop
+
+It could happen that the main loop was quit with some pending GSource,
+which prevents free of the session, which causes the test failure. Ensure
+the main context does not have the leftover GSource by closing the base
+stream and by freeing the multipart object before quitting the main loop.
+
+Assisted-by: Claude Opus 4.6
+---
+ tests/multipart-test.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/multipart-test.c b/tests/multipart-test.c
+index 3d85e22..3842943 100644
+--- a/tests/multipart-test.c
++++ b/tests/multipart-test.c
+@@ -310,6 +310,7 @@ multipart_next_part_cb (GObject *source, GAsyncResult *res, gpointer data)
+ g_assert_no_error (error);
+ if (error) {
+ g_clear_error (&error);
++ g_input_stream_close (G_FILTER_INPUT_STREAM (multipart)->base_stream, NULL, NULL);
+ g_object_unref (multipart);
+ g_main_loop_quit (loop);
+ return;
+@@ -317,6 +318,7 @@ multipart_next_part_cb (GObject *source, GAsyncResult *res, gpointer data)
+
+ if (!in) {
+ g_assert_cmpint (passes, ==, 4);
++ g_input_stream_close (G_FILTER_INPUT_STREAM (multipart)->base_stream, NULL, NULL);
+ g_object_unref (multipart);
+ g_main_loop_quit (loop);
+ return;
+@@ -408,8 +410,10 @@ sync_multipart_handling_cb (GObject *source, GAsyncResult *res, gpointer data)
+
+ g_assert_cmpint (passes, ==, 4);
+
+- g_main_loop_quit (loop);
++ g_input_stream_close (G_FILTER_INPUT_STREAM (multipart)->base_stream, NULL, NULL);
+ g_object_unref (multipart);
++
++ g_main_loop_quit (loop);
+ }
+
+ static void
+--
+2.54.0
diff --git a/soup-body-input-stream-limit-buffer-read-to-the-received-content.patch b/soup-body-input-stream-limit-buffer-read-to-the-received-content.patch
new file mode 100644
index 0000000..c599248
--- /dev/null
+++ b/soup-body-input-stream-limit-buffer-read-to-the-received-content.patch
@@ -0,0 +1,29 @@
+From 72e566d82363ba35cdcf4a8c7b4826029f7190ff Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Tue, 23 Jun 2026 08:44:02 +0200
+Subject: [PATCH] soup-body-input-stream: Limit buffer read to the received
+ content
+
+The strstr() could read after the read content in the buffer, where it
+could garbage data not belonging to the buffer.
+
+Assisted-by: Claude Opus 4.6
+---
+ libsoup/http1/soup-body-input-stream.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libsoup/http1/soup-body-input-stream.c b/libsoup/http1/soup-body-input-stream.c
+index 6dd0809..ba84d00 100644
+--- a/libsoup/http1/soup-body-input-stream.c
++++ b/libsoup/http1/soup-body-input-stream.c
+@@ -198,7 +198,7 @@ again:
+ }
+
+ /* ignore extensions */
+- boundary = strstr (metabuf, ";");
++ boundary = memchr (metabuf, ';', nread);
+ if (boundary)
+ *boundary = '\0';
+ else
+--
+2.54.0
reply other threads:[~2026-06-24 7:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178228653018.1.14606708542701366340.rpms-libsoup3-9fbcdc520f70@fedoraproject.org \
--to=oholy@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox