public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Grulich <jgrulich@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Fix girepository test for big endian systems
Date: Tue, 11 Aug 2026 10:38:39 GMT	[thread overview]
Message-ID: <178644471907.1.2874131408378823847.rpms-glib2-b02a6280d34c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/glib2
Branch : cve-2026-58016-f44
Commit : b02a6280d34cd886ad0b139d4f49107d459020c1
Author : Jan Grulich <jgrulich@redhat.com>
Date   : 2026-02-09T14:57:18+01:00
Stats  : +39/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/glib2/c/b02a6280d34cd886ad0b139d4f49107d459020c1?branch=cve-2026-58016-f44

Log:
Fix girepository test for big endian systems

---
diff --git a/glib2-girepository-fixup-ffi-test-for-big-endian-systems.patch b/glib2-girepository-fixup-ffi-test-for-big-endian-systems.patch
new file mode 100644
index 0000000..02bcb36
--- /dev/null
+++ b/glib2-girepository-fixup-ffi-test-for-big-endian-systems.patch
@@ -0,0 +1,37 @@
+From de5108bc646f9a29c2eb58059be0062becd784ad Mon Sep 17 00:00:00 2001
+From: Alessandro Astone <alessandro.astone@canonical.com>
+Date: Wed, 21 Jan 2026 15:19:51 +0100
+Subject: [PATCH] girepository: Fixup ffi test for big-endian systems
+
+The input arguments are of pointer type, so we need to read the full 8 bytes
+and pass them into GPOINTER_TO_INT.
+
+The return argument is an integer which follows the ffi promotion behaviour,
+so it also gets 8 bytes of allocation.
+
+Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3865
+---
+ girepository/tests/callable-info.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/girepository/tests/callable-info.c b/girepository/tests/callable-info.c
+index 3821cf16cb..a9fa194cd7 100644
+--- a/girepository/tests/callable-info.c
++++ b/girepository/tests/callable-info.c
+@@ -220,10 +220,10 @@ compare_func_callback (ffi_cif *passed_cif,
+                        void **args,
+                        void *user_data)
+ {
+-  int *return_location = ret;
++  ffi_sarg *return_location = ret;
+   unsigned *call_count = user_data;
+-  int arg1 = GPOINTER_TO_INT (*(int *) args[0]);
+-  int arg2 = GPOINTER_TO_INT (*(int *) args[1]);
++  int arg1 = GPOINTER_TO_INT (*(void **) args[0]);
++  int arg2 = GPOINTER_TO_INT (*(void **) args[1]);
+ 
+   /* cif is not needed in this simple test, but check that it is what the
+    * documentation says it is */
+-- 
+GitLab
+

diff --git a/glib2.spec b/glib2.spec
index c98b7de..121c763 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -15,6 +15,8 @@ Patch:          gnutls-hmac.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=2192204
 Patch:          default-terminal.patch
 
+Patch:          glib2-girepository-fixup-ffi-test-for-big-endian-systems.patch
+
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
 BuildRequires:  gettext

                 reply	other threads:[~2026-08-11 10:38 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=178644471907.1.2874131408378823847.rpms-glib2-b02a6280d34c@fedoraproject.org \
    --to=jgrulich@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