From f279e492d60f9e6b1e5bef55bc0deaa57dd24ea0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 9 May 2010 17:12:51 +0200 Subject: Check to make sure they're real nodes before parsing more. --- libdbusmenu-glib/client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libdbusmenu-glib/client.c') 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); -- cgit v1.2.3