diff options
| author | 2026-11-05 09:39:06 +0100 | |
|---|---|---|
| committer | 2026-11-05 09:39:06 +0100 | |
| commit | 621886ffc072699a530530fe544f828b9b2a8ef8 (patch) | |
| tree | 6a97aaddb9304a3e97c90309d8bc5c1e0bb4d206 /test/data/dictref2bytes.bplist | |
| parent | 3e9c034c93fa6f59584ec179d3df1333f250c694 (diff) | |
| download | libplist-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 'test/data/dictref2bytes.bplist')
0 files changed, 0 insertions, 0 deletions
