[zenity] Avoid a segfault

Matthias Clasen mclasen at fedoraproject.org
Tue Jan 25 23:52:22 UTC 2011


commit 414cf4d3b0159ebdbb7758708b205072dab1f668
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Jan 25 18:52:05 2011 -0500

    Avoid a segfault

 0001-Reset-errors-after-freeing-them.patch |   34 ++++++++++++++++++++++++++++
 zenity.spec                                |   10 +++++++-
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/0001-Reset-errors-after-freeing-them.patch b/0001-Reset-errors-after-freeing-them.patch
new file mode 100644
index 0000000..d1678d4
--- /dev/null
+++ b/0001-Reset-errors-after-freeing-them.patch
@@ -0,0 +1,34 @@
+From 55df95a2f737ae89bab9fe82c5e2a9e620761f05 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Tue, 25 Jan 2011 18:49:01 -0500
+Subject: [PATCH] Reset errors after freeing them
+
+This was causing segfaults:
+https://bugzilla.redhat.com/show_bug.cgi?id=670895
+---
+ src/notification.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/notification.c b/src/notification.c
+index 6fe44f1..41d64e2 100644
+--- a/src/notification.c
++++ b/src/notification.c
+@@ -133,6 +133,7 @@ zenity_notification_handle_stdin (GIOChannel *channel,
+           if (error) {
+             g_warning ("Error showing notification: %s", error->message);
+             g_error_free (error);
++            error = NULL;
+           }
+ 
+ 	  g_object_unref (notif);
+@@ -150,6 +151,7 @@ zenity_notification_handle_stdin (GIOChannel *channel,
+           if (error) {
+             g_warning ("Error showing notification: %s", error->message);
+             g_error_free (error);
++            error = NULL;
+           }
+         }
+       } else if (!g_ascii_strcasecmp (command, "visible")) {
+-- 
+1.7.3.5
+
diff --git a/zenity.spec b/zenity.spec
index 51b1f1d..c8f3bb7 100644
--- a/zenity.spec
+++ b/zenity.spec
@@ -1,6 +1,6 @@
 Name:           zenity
 Version:        2.91.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Display dialog boxes from shell scripts
 Group:          Applications/System
 License:        LGPLv2+
@@ -8,6 +8,9 @@ URL:            http://directory.fsf.org/zenity.html
 #VCS: git:git://git.gnome.org/zenity
 Source:         http://download.gnome.org/sources/zenity/2.91/zenity-%{version}.tar.bz2
 
+# upstream fix
+Patch0: 0001-Reset-errors-after-freeing-them.patch
+
 BuildRequires: gnome-doc-utils >= 0.3.2
 BuildRequires: glib2-devel >= 2.7.3
 BuildRequires: gtk3-devel >= 2.99.0
@@ -24,6 +27,8 @@ from the same family as dialog, Xdialog, and cdialog.
 
 %prep
 %setup -q
+%patch0 -p1 -b .reset-errors
+
 intltoolize --force
 
 
@@ -50,6 +55,9 @@ rm $RPM_BUILD_ROOT%{_bindir}/gdialog
 
 
 %changelog
+* Tue Jan 25 2011 Matthias Clasen <mclasen at redhat.com> - 2.91.5-2
+- Avoid a segfault (#670895)
+
 * Mon Jan 10 2011 Matthias Clasen <mclasen at redhat.com> - 2.91.5-1
 - Update to 2.91.5
 


More information about the scm-commits mailing list