← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/dbusmenu/reject-text-nodes into lp:dbusmenu

 

Ted Gould has proposed merging lp:~ted/dbusmenu/reject-text-nodes into lp:dbusmenu.

Requested reviews:
  DBus Menu Team (dbusmenu-team)


Check to make sure they're real nodes before parsing more.
-- 
https://code.launchpad.net/~ted/dbusmenu/reject-text-nodes/+merge/24955
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
=== modified file 'libdbusmenu-glib/client.c'
--- libdbusmenu-glib/client.c	2010-04-16 17:21:02 +0000
+++ libdbusmenu-glib/client.c	2010-05-09 15:20:48 +0000
@@ -533,6 +533,9 @@
 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);


Follow ups