public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/glib2] cve-2026-58016-f44: Fix girepository test for big endian systems
@ 2026-08-11 10:38 Jan Grulich
  0 siblings, 0 replies; only message in thread
From: Jan Grulich @ 2026-08-11 10:38 UTC (permalink / raw)
  To: git-commits

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-11 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 10:38 [rpms/glib2] cve-2026-58016-f44: Fix girepository test for big endian systems Jan Grulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox