aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Coulson <chrisccoulson@ubuntu.com>2011-02-28 17:20:24 +0000
committerChris Coulson <chrisccoulson@ubuntu.com>2011-02-28 17:20:24 +0000
commitf9bc2ad66bbd631b17d264cb1baddf600b67ed7c (patch)
tree1cd2643eb801271e7b04dc1f7240f1a814208d0a
parent218b2b32a73881b198f09f74725d395d2d27acdc (diff)
downloadlibdbusmenu-f9bc2ad66bbd631b17d264cb1baddf600b67ed7c.tar.gz
libdbusmenu-f9bc2ad66bbd631b17d264cb1baddf600b67ed7c.tar.bz2
libdbusmenu-f9bc2ad66bbd631b17d264cb1baddf600b67ed7c.zip
Check the return value of gdk_keyval_name, as passing NULL pointers
to g_variant_builder_add can cause bad things to happen. Might fix LP: #720895
-rw-r--r--libdbusmenu-gtk/menuitem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index 508b43f..fd8246c 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -194,6 +194,7 @@ dbusmenu_menuitem_property_set_shortcut (DbusmenuMenuitem * menuitem, guint key,
}
const gchar * keyname = gdk_keyval_name(key);
+ g_return_val_if_fail(keyname != NULL, FALSE);
g_variant_builder_add(&builder, "s", keyname);
GVariant * inside = g_variant_builder_end(&builder);