all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 62467@debbugs.gnu.org
Cc: rg@raghavgururajan.name, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#62467] [PATCH gnome-team v3 10/15] gnu: gtk+-2: Fix build by hardening list store.
Date: Thu, 30 Mar 2023 20:41:59 +0200	[thread overview]
Message-ID: <4dbf541e337c0b2324247fc10ff532f788bd0afd.camel@gmail.com> (raw)
In-Reply-To: <716b57a44002b5d866aff0d2abe0190c90a39556.camel@gmail.com>

* gnu/packages/patches/gtk2-harden-list-store.patch: New file.
* gnu/packages/gtk.scm (gtk+-2)[patches]: Add it here.
* gnu/local.mk (dist_patch_DATA): Register it here.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gtk.scm                          |  1 +
 .../patches/gtk2-harden-list-store.patch      | 42 +++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 gnu/packages/patches/gtk2-harden-list-store.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 67ec1b754a..df78ce263e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1303,6 +1303,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/guile-rsvg-pkgconfig.patch		\
   %D%/packages/patches/guile-emacs-fix-configure.patch		\
   %D%/packages/patches/gtk2-fix-builder-test.patch		\
+  %D%/packages/patches/gtk2-harden-list-store.patch		\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtk2-theme-paths.patch			\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3e57035bac..6d3bbb42be 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1014,6 +1014,7 @@ (define-public gtk+-2
                 "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
               (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
                                        "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+                                       "gtk2-harden-list-store.patch"
                                        "gtk2-theme-paths.patch"
                                        "gtk2-fix-builder-test.patch"))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/gtk2-harden-list-store.patch b/gnu/packages/patches/gtk2-harden-list-store.patch
new file mode 100644
index 0000000000..f49dc3bc77
--- /dev/null
+++ b/gnu/packages/patches/gtk2-harden-list-store.patch
@@ -0,0 +1,42 @@
+Backport the implementation of gtk_list_store_iter_is_valid from gtk+-3.
+
+Index: gtk+-2.24.33/gtk/gtkliststore.c
+===================================================================
+--- gtk+-2.24.33.orig/gtk/gtkliststore.c
++++ gtk+-2.24.33/gtk/gtkliststore.c
+@@ -1195,16 +1195,31 @@ gboolean
+ gtk_list_store_iter_is_valid (GtkListStore *list_store,
+                               GtkTreeIter  *iter)
+ {
++  GSequenceIter *seq_iter;
++
+   g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE);
+   g_return_val_if_fail (iter != NULL, FALSE);
+ 
+-  if (!VALID_ITER (iter, list_store))
+-    return FALSE;
++  /* can't use VALID_ITER() here, because iter might point
++   * to random memory.
++   *
++   * We MUST NOT dereference it.
++   */
+ 
+-  if (g_sequence_iter_get_sequence (iter->user_data) != list_store->seq)
++  if (iter == NULL ||
++      iter->user_data == NULL ||
++      list_store->stamp != iter->stamp)
+     return FALSE;
+ 
+-  return TRUE;
++  for (seq_iter = g_sequence_get_begin_iter (list_store->seq);
++       !g_sequence_iter_is_end (seq_iter);
++       seq_iter = g_sequence_iter_next (seq_iter))
++    {
++      if (seq_iter == iter->user_data)
++        return TRUE;
++    }
++
++  return FALSE;
+ }
+ 
+ static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
-- 
2.39.2





  parent reply	other threads:[~2023-04-11  7:12 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 19:20 [bug#62467] [PATCH gnome-team 0/5] Update fundamental packages Liliana Marie Prikler
2023-03-26 15:39 ` [bug#62467] [PATCH gnome-team 1/5] gnu: glib: Update to 2.76.1 Liliana Marie Prikler
2023-03-26 15:39 ` [bug#62467] [PATCH gnome-team v3 02/15] " Liliana Marie Prikler
2023-03-26 15:39 ` [bug#62467] [PATCH gnome-team v2 01/12] " Liliana Marie Prikler
2023-04-08 19:37   ` Maxim Cournoyer
2023-04-08 19:54     ` Liliana Marie Prikler
2023-04-09  5:03       ` Maxim Cournoyer
2023-03-26 15:53 ` [bug#62467] [PATCH gnome-team 2/5] gnu: Make pango-next the new pango Liliana Marie Prikler
2023-03-26 15:53 ` [bug#62467] [PATCH gnome-team v3 03/15] " Liliana Marie Prikler
2023-03-26 15:53 ` [bug#62467] [PATCH gnome-team v2 02/12] " Liliana Marie Prikler
2023-04-08 19:39   ` Maxim Cournoyer
2023-03-26 18:53 ` [bug#62467] [PATCH gnome-team v2 03/12] gnu: pango: Update to 1.50.14 Liliana Marie Prikler
2023-04-08 19:39   ` Maxim Cournoyer
2023-03-26 18:53 ` [bug#62467] [PATCH gnome-team 3/5] " Liliana Marie Prikler
2023-03-26 18:53 ` [bug#62467] [PATCH gnome-team v3 04/15] " Liliana Marie Prikler
2023-03-26 19:14 ` [bug#62467] [PATCH gnome-team 4/5] gnu: Make gobject-introspection-next the new gobject-introspection Liliana Marie Prikler
2023-03-26 19:14 ` [bug#62467] [PATCH gnome-team v3 05/15] " Liliana Marie Prikler
2023-03-26 19:14 ` [bug#62467] [PATCH gnome-team v2 04/12] " Liliana Marie Prikler
2023-04-08 19:41   ` Maxim Cournoyer
2023-03-26 19:19 ` [bug#62467] [PATCH gnome-team 5/5] gnu: gobject-introspection: Update to 1.76.1 Liliana Marie Prikler
2023-03-26 19:19 ` [bug#62467] [PATCH gnome-team v2 05/12] " Liliana Marie Prikler
2023-04-08 19:40   ` Maxim Cournoyer
2023-03-26 19:19 ` [bug#62467] [PATCH gnome-team v3 06/15] " Liliana Marie Prikler
2023-03-28  4:26 ` [bug#62467] [PATCH gnome-team v3 07/15] gnu: libsoup-minimal@2: Update to 2.74.3 Liliana Marie Prikler
2023-03-28  4:26 ` [bug#62467] [PATCH gnome-team v2 06/12] " Liliana Marie Prikler
2023-04-08 19:42   ` Maxim Cournoyer
2023-04-08 19:56     ` Liliana Marie Prikler
2023-04-09  5:04       ` Maxim Cournoyer
2023-03-28 16:50 ` [bug#62467] [PATCH gnome-team v3 08/15] gnu: python-pygobject: Set upstream-name Liliana Marie Prikler
2023-03-28 16:50 ` [bug#62467] [PATCH gnome-team v2 07/12] " Liliana Marie Prikler
2023-04-08 19:42   ` Maxim Cournoyer
2023-03-28 16:51 ` [bug#62467] [PATCH gnome-team v2 08/12] gnu: python-pygobject: Update to 3.44.1 Liliana Marie Prikler
2023-04-08 19:43   ` Maxim Cournoyer
2023-03-28 16:51 ` [bug#62467] [PATCH gnome-team v3 09/15] " Liliana Marie Prikler
2023-03-28 19:34 ` [bug#62467] [PATCH gnome-team v2 11/12] gnu: librsvg: Fix build Liliana Marie Prikler
2023-04-08 19:49   ` Maxim Cournoyer
2023-04-08 20:03     ` Liliana Marie Prikler
2023-04-09  5:07       ` Maxim Cournoyer
2023-04-10 12:51     ` Liliana Marie Prikler
2023-04-11  1:49       ` Maxim Cournoyer
2023-03-28 19:34 ` [bug#62467] [PATCH gnome-team v3 12/15] " Liliana Marie Prikler
2023-03-30  4:28 ` [bug#62467] [PATCH gnome-team v2 10/12] gnu: gtk+: Update to 3.24.37 Liliana Marie Prikler
2023-04-08 19:34   ` Maxim Cournoyer
2023-03-30  4:28 ` [bug#62467] [PATCH gnome-team v3 11/15] " Liliana Marie Prikler
2023-03-30 18:41 ` Liliana Marie Prikler [this message]
2023-03-30 18:41 ` [bug#62467] [PATCH gnome-team v2 09/12] gnu: gtk+-2: Fix build by hardening list store Liliana Marie Prikler
2023-04-08 19:47   ` Maxim Cournoyer
2023-04-08 20:00     ` Liliana Marie Prikler
2023-04-09  5:06       ` Maxim Cournoyer
2023-03-31 18:54 ` [bug#62467] [PATCH gnome-team v2 12/12] gnu: inkscape: Update stable version to 1.2.1 Liliana Marie Prikler
2023-04-08 19:51   ` Maxim Cournoyer
2023-03-31 18:54 ` [bug#62467] [PATCH gnome-team v3 13/15] " Liliana Marie Prikler
2023-03-31 21:43 ` [bug#62467] [PATCH gnome-team v2 00/12] Update fundamental packages Liliana Marie Prikler
2023-04-02 17:27   ` Raghav Gururajan via Guix-patches via
2023-04-02 18:20     ` Liliana Marie Prikler
2023-04-03 16:37 ` [bug#62467] [PATCH gnome-team v3 01/15] gnu: librsvg-2.40: Fix test failure with Pango 1.50 Kaelyn Takata
2023-04-11 20:52   ` Maxim Cournoyer
2023-04-10  7:08 ` [bug#62467] [PATCH gnome-team v3 14/15] gnu: inkscape: Use new package style Liliana Marie Prikler
2023-04-10 16:12 ` [bug#62467] [PATCH gnome-team v3 15/15] gnu: Remove lib2geom 1.1 Liliana Marie Prikler
2023-04-11 20:57   ` Maxim Cournoyer
2023-04-12  5:33     ` Liliana Marie Prikler
2023-04-13  2:33       ` Maxim Cournoyer
2023-04-13  5:12         ` bug#62467: " Liliana Marie Prikler
2023-04-11  7:06 ` [bug#62467] [PATCH gnome-team v3 00/15] Update glib to 2.76.1 Liliana Marie Prikler

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=4dbf541e337c0b2324247fc10ff532f788bd0afd.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=62467@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rg@raghavgururajan.name \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.