[mate-terminal] 01/02: debian/patches: Add 1002_fix-occasional-segfaults-at-session-startup.patch. Fix segfaults for mate-terminal in non-standard setups if started during session startup. (Closes: #769947).
Mike Gabriel
sunweaver at debian.org
Sun Nov 30 19:29:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository mate-terminal.
commit e0f98aa14841c5629a8b3093dac1e03b1cd9bad0
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Nov 30 20:24:05 2014 +0100
debian/patches: Add 1002_fix-occasional-segfaults-at-session-startup.patch. Fix segfaults for mate-terminal in non-standard setups if started during session startup. (Closes: #769947).
---
...x-occasional-segfaults-at-session-startup.patch | 32 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 33 insertions(+)
diff --git a/debian/patches/1002_fix-occasional-segfaults-at-session-startup.patch b/debian/patches/1002_fix-occasional-segfaults-at-session-startup.patch
new file mode 100644
index 0000000..895cd4b
--- /dev/null
+++ b/debian/patches/1002_fix-occasional-segfaults-at-session-startup.patch
@@ -0,0 +1,32 @@
+From bb659a752efbeedbe60fb6df5541a57c95777279 Mon Sep 17 00:00:00 2001
+From: Nikolay Martynov <mar.kolya at gmail.com>
+Date: Mon, 24 Nov 2014 22:46:51 -0500
+Subject: [PATCH] Properly check gdk_property_get result
+
+Check return value of gdk_property_get in get_initial_workspace before using its result
+
+Current implementation segfaults from to time if terminal is started at X session startup
+
+Looks like #769947 bug in Debian describes same issue
+---
+ src/terminal.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/terminal.c b/src/terminal.c
+index a6bf43f..f9989a5 100644
+--- a/src/terminal.c
++++ b/src/terminal.c
+@@ -532,10 +532,10 @@ get_initial_workspace (void)
+ atom = gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP");
+ cardinal_atom = gdk_atom_intern_static_string ("CARDINAL");
+
+- gdk_property_get (window, atom, cardinal_atom, 0, 8, FALSE, NULL, NULL, NULL, &data);
+-
+- ret = *(int *)data;
+- g_free (data);
++ if (gdk_property_get (window, atom, cardinal_atom, 0, 8, FALSE, NULL, NULL, NULL, &data)) {
++ ret = *(int *)data;
++ g_free (data);
++ }
+ return ret;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index f812820..150ef5e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
1001_add-keywords-to-desktop-files.patch
+1002_fix-occasional-segfaults-at-session-startup.patch
2001_omit-gfdl-licensed-help-files.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-terminal.git
More information about the pkg-mate-commits
mailing list