public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/glib2] cve-2026-58016-f44: Fix getting etag attributes
@ 2026-08-11 10:37 David King
  0 siblings, 0 replies; only message in thread
From: David King @ 2026-08-11 10:37 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/glib2
            Branch : cve-2026-58016-f44
            Commit : 95c4c12179c50710f07d5eaeb682a93e43fde12f
            Author : David King <amigadave@amigadave.com>
            Date   : 2023-03-06T18:29:58+00:00
            Stats  : +58/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/glib2/c/95c4c12179c50710f07d5eaeb682a93e43fde12f?branch=cve-2026-58016-f44

            Log:
            Fix getting etag attributes

Fixes gjs test failures.

---
diff --git a/glib2-2.75.4-fix-etag-gjs.patch b/glib2-2.75.4-fix-etag-gjs.patch
new file mode 100644
index 0000000..e3e1490
--- /dev/null
+++ b/glib2-2.75.4-fix-etag-gjs.patch
@@ -0,0 +1,56 @@
+From 4e62e55d6d0109012869a589eae2371e836e9cb3 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <pwithnall@endlessos.org>
+Date: Mon, 6 Mar 2023 13:02:41 +0000
+Subject: [PATCH] gfile: Check ETag attribute is present before trying to get
+ it
+
+A regression from issue #2907.
+
+Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
+
+Fixes: #2932
+---
+ gio/gfile.c            | 4 ++--
+ gio/gpollfilemonitor.c | 4 +++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gfile.c b/gio/gfile.c
+index 84353cb44c..7cfe1ffb4d 100644
+--- a/gio/gfile.c
++++ b/gio/gfile.c
+@@ -7773,7 +7773,7 @@ g_file_load_contents (GFile         *file,
+                                              NULL);
+       if (info)
+         {
+-          *etag_out = g_strdup (g_file_info_get_etag (info));
++          *etag_out = g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_ETAG_VALUE) ? g_strdup (g_file_info_get_etag (info)) : NULL;
+           g_object_unref (info);
+         }
+     }
+@@ -7847,7 +7847,7 @@ load_contents_fstat_callback (GObject      *obj,
+                                                 stat_res, NULL);
+   if (info)
+     {
+-      data->etag = g_strdup (g_file_info_get_etag (info));
++      data->etag = g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_ETAG_VALUE) ? g_strdup (g_file_info_get_etag (info)) : NULL;
+       g_object_unref (info);
+     }
+ 
+diff --git a/gio/gpollfilemonitor.c b/gio/gpollfilemonitor.c
+index 685ede964e..c4dfd99132 100644
+--- a/gio/gpollfilemonitor.c
++++ b/gio/gpollfilemonitor.c
+@@ -89,7 +89,9 @@ calc_event_type (GFileInfo *last,
+   if (last != NULL && new == NULL)
+     return G_FILE_MONITOR_EVENT_DELETED;
+ 
+-  if (g_strcmp0 (g_file_info_get_etag (last), g_file_info_get_etag (new)))
++  if (g_file_info_has_attribute (last, G_FILE_ATTRIBUTE_ETAG_VALUE) &&
++      g_file_info_has_attribute (new, G_FILE_ATTRIBUTE_ETAG_VALUE) &&
++      g_strcmp0 (g_file_info_get_etag (last), g_file_info_get_etag (new)) != 0)
+     return G_FILE_MONITOR_EVENT_CHANGED;
+   
+   if (g_file_info_get_size (last) != g_file_info_get_size (new))
+-- 
+GitLab
+

diff --git a/glib2.spec b/glib2.spec
index beb3cc6..e0601aa 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -11,6 +11,8 @@ Source0: https://download.gnome.org/sources/glib/2.75/glib-%{version}.tar.xz
 # https://bugzilla.redhat.com/show_bug.cgi?id=1630260
 # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/903
 Patch0: gnutls-hmac.patch
+# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3312.patch
+Patch1: glib2-2.75.4-fix-etag-gjs.patch
 
 BuildRequires: gcc
 BuildRequires: gcc-c++

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

only message in thread, other threads:[~2026-08-11 10:37 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:37 [rpms/glib2] cve-2026-58016-f44: Fix getting etag attributes David King

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