diff options
author | Nikias Bassen | 2012-11-08 21:22:53 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-11-08 21:22:53 +0100 |
commit | 58151b6cd801435d79145907cf6ef779d21573d3 (patch) | |
tree | b3e44d8d1afa3071c44561573c494a92ada0bd2d /src/xplist.c | |
parent | c9382f08d1fec4951b9acea9345ddd64cd619d56 (diff) | |
download | libplist-58151b6cd801435d79145907cf6ef779d21573d3.tar.gz libplist-58151b6cd801435d79145907cf6ef779d21573d3.tar.bz2 |
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.
Diffstat (limited to 'src/xplist.c')
-rw-r--r-- | src/xplist.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |