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