[mate-settings-daemon] 01/02: debian/patches: 0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch. Prevent mate-settings-daemon and thus MATE desktop from crashing (e.g.) during screen size changes or screen configuration changes. (Closes: #780399, LP:#1430204).

Mike Gabriel sunweaver at debian.org
Fri Mar 13 13:35:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository mate-settings-daemon.

commit c4d9a85157eb4b72e6a1c92ec16c2c1d241c0456
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Mar 13 14:27:56 2015 +0100

    debian/patches: 0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch. Prevent mate-settings-daemon and thus MATE desktop from crashing (e.g.) during screen size changes or screen configuration changes. (Closes: #780399, LP:#1430204).
---
 ...ess-to-list-elements-in-background-plugin.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch b/debian/patches/0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch
new file mode 100644
index 0000000..00de2e3
--- /dev/null
+++ b/debian/patches/0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch
@@ -0,0 +1,24 @@
+From a93ff2978e819041c2f91fdf7435cd111e157141 Mon Sep 17 00:00:00 2001
+From: monsta <monsta at inbox.ru>
+Date: Fri, 13 Mar 2015 14:40:29 +0300
+Subject: [PATCH] background plugin: safer access to list element's data
+
+g_list_nth_data just returns NULL if either list or element is NULL
+---
+ plugins/background/msd-background-manager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c
+index 215be80..5b6a04b 100644
+--- a/plugins/background/msd-background-manager.c
++++ b/plugins/background/msd-background-manager.c
+@@ -269,7 +269,7 @@ on_screen_size_changed (GdkScreen            *screen,
+ 		return;
+ 
+ 	gint scr_num = gdk_screen_get_number (screen);
+-	gchar *old_size = g_list_nth (manager->priv->scr_sizes, scr_num)->data;
++	gchar *old_size = g_list_nth_data (manager->priv->scr_sizes, scr_num);
+ 	gchar *new_size = g_strdup_printf ("%dx%d", gdk_screen_get_width (screen),
+ 						    gdk_screen_get_height (screen));
+ 	if (g_strcmp0 (old_size, new_size) != 0)
+
diff --git a/debian/patches/series b/debian/patches/series
index 9a8ddbb..11c2729 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 0001_prefer-gcalculator-for-media-keys.patch
 0002_fix-a11y-keyboard-dialog-segfaults.patch
+0003_fix-unsafe-access-to-list-elements-in-background-plugin.patch
 1001_fix-numlock-cpu-usage.patch
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-settings-daemon.git



More information about the pkg-mate-commits mailing list