summaryrefslogtreecommitdiffstats
path: root/fuzz/jplist-crashes
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2026-11-05 09:39:06 +0100
committerGravatar Nikias Bassen2026-11-05 09:39:06 +0100
commit621886ffc072699a530530fe544f828b9b2a8ef8 (patch)
tree6a97aaddb9304a3e97c90309d8bc5c1e0bb4d206 /fuzz/jplist-crashes
parent3e9c034c93fa6f59584ec179d3df1333f250c694 (diff)
downloadlibplist-621886ffc072699a530530fe544f828b9b2a8ef8.tar.gz
libplist-621886ffc072699a530530fe544f828b9b2a8ef8.tar.bz2
xplist: fix memory leak when adding a node to its parent fails
node_from_xml() ignored the return values of plist_dict_set_item() and plist_array_append_item(). When the insertion failed (e.g. when the nesting depth limit is hit in node_attach()), the newly created node was never attached, yet subnode was reset to NULL, so the node, its data and its string value were leaked. Check the return values and bail out with PLIST_ERR_PARSE so that the unattached node is freed in the error path. Credit to OSSFuzz
Diffstat (limited to 'fuzz/jplist-crashes')
0 files changed, 0 insertions, 0 deletions