summaryrefslogtreecommitdiffstats
path: root/test/data/empty_keys.plist
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2026-11-05 10:44:41 +0100
committerGravatar Nikias Bassen2026-11-05 11:59:00 +0100
commitf252f243f9774b2b830172b49aa340d6994d8081 (patch)
treea7753a4fb73cabba3657f95460e80bbd5f2f314a /test/data/empty_keys.plist
parent3347d52167a36952666856c2b5ad2a5e9adda3a2 (diff)
downloadlibplist-f252f243f9774b2b830172b49aa340d6994d8081.tar.gz
libplist-f252f243f9774b2b830172b49aa340d6994d8081.tar.bz2
xplist: fix double-free in node_from_xml() error paths
node_from_xml() hands a freshly created node over to the tree (as root, or by adding it to a dict/array parent), but only reset `subnode` at the very end of the block. If an error occurred in between, e.g. the allocation of the node path item failing right after the root node was assigned to *plist, err_out freed the node while the tree still referenced it, and plist_free(*plist) then freed it a second time. Clear `subnode` right after the node has been successfully attached so that err_out can never free a node owned by the tree. Also report PLIST_ERR_NO_MEM instead of PLIST_ERR_PARSE when allocating the node path item fails. Co-authored-by: bg0d-droid <81825610+bg0d-droid@users.noreply.github.com>
Diffstat (limited to 'test/data/empty_keys.plist')
0 files changed, 0 insertions, 0 deletions