From 58151b6cd801435d79145907cf6ef779d21573d3 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 8 Nov 2012 21:22:53 +0100 Subject: Fix crash when converting plists containing comments Thanks to free2000fly for pointing this out. The issue was that XML plists with comments converted to binary plists would result in invalid binary nodes, thus converting back these binary plists resulted in a crash. --- src/xplist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xplist.c b/src/xplist.c index 2b8c8f5..6147265 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -336,6 +336,10 @@ static void xml_to_node(xmlNodePtr xml_node, plist_t * plist_node) if (!node) break; + if (!xmlStrcmp(node->name, BAD_CAST("comment"))) { + continue; + } + data = plist_new_plist_data(); subnode = plist_new_node(data); if (*plist_node) -- cgit v1.1-32-gdbae