diff options
author | Ted Gould <ted@gould.cx> | 2010-05-09 17:12:51 +0200 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-05-09 17:12:51 +0200 |
commit | f279e492d60f9e6b1e5bef55bc0deaa57dd24ea0 (patch) | |
tree | 348760aeea89f239cc273c8878236281245b809b | |
parent | 57dc6f720b9419260de8dd22f2665f8f7a3fad1f (diff) | |
download | libdbusmenu-f279e492d60f9e6b1e5bef55bc0deaa57dd24ea0.tar.gz libdbusmenu-f279e492d60f9e6b1e5bef55bc0deaa57dd24ea0.tar.bz2 libdbusmenu-f279e492d60f9e6b1e5bef55bc0deaa57dd24ea0.zip |
Check to make sure they're real nodes before parsing more.
-rw-r--r-- | libdbusmenu-glib/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index d2ba541..c0d3b7a 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -533,6 +533,9 @@ build_proxies (DbusmenuClient * client) static gint parse_node_get_id (xmlNodePtr node) { + if (node->type != XML_ELEMENT_NODE) { + return -1; + } if (g_strcmp0((gchar *)node->name, "menu") != 0) { /* This kills some nodes early */ g_warning("XML Node is not 'menu' it is '%s'", node->name); |