Blame SOURCES/control-center-3.14.5-check-for-zero-length-string.patch

ea7a08
From 07c60aed43e2149db7aff9e82d8ca147b1752367 Mon Sep 17 00:00:00 2001
ea7a08
From: Marek Kasik <mkasik@redhat.com>
ea7a08
Date: Fri, 17 Jul 2015 10:56:00 +0200
ea7a08
Subject: [PATCH] notifications: Don't crash because of zero-length string
ea7a08
ea7a08
Check whether given application child is at least 1 character
ea7a08
long to avoid crash which can happen as a result of creating
ea7a08
of GDesktopAppInfo with NULL desktop file id.
ea7a08
To reproduce this run "gnome-control-center notifications" and
ea7a08
"gsettings set org.gnome.desktop.notifications application-children "['']"".
ea7a08
ea7a08
https://bugzilla.gnome.org/show_bug.cgi?id=752525
ea7a08
---
ea7a08
 panels/notifications/cc-notifications-panel.c | 3 +++
ea7a08
 1 file changed, 3 insertions(+)
ea7a08
ea7a08
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
ea7a08
index 8c4598a..a0c24b1 100644
ea7a08
--- a/panels/notifications/cc-notifications-panel.c
ea7a08
+++ b/panels/notifications/cc-notifications-panel.c
ea7a08
@@ -331,6 +331,9 @@ maybe_add_app_id (CcNotificationsPanel *panel,
ea7a08
   GSettings *settings;
ea7a08
   GAppInfo *app_info;
ea7a08
 
ea7a08
+  if (*canonical_app_id == '\0')
ea7a08
+    return;
ea7a08
+
ea7a08
   if (g_hash_table_contains (panel->known_applications,
ea7a08
                              canonical_app_id))
ea7a08
     return;
ea7a08
-- 
ea7a08
2.4.3
ea7a08