summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-01-09 19:01:14 +0100
committerGravatar Nikias Bassen2023-01-09 19:01:14 +0100
commit62b03b85a56a7b98e6eef237deeff1a8b41f8fb8 (patch)
treef0217b075c235ea593f271e1c3a1fdd804d2dc77 /src
parent491a3acc1015951042c95c389a10634e331818c4 (diff)
downloadlibplist-62b03b85a56a7b98e6eef237deeff1a8b41f8fb8.tar.gz
libplist-62b03b85a56a7b98e6eef237deeff1a8b41f8fb8.tar.bz2
oplist: Fix use-after-free by setting free'd pointer to NULL
Credit to OSS-Fuzz
Diffstat (limited to 'src')
-rw-r--r--src/oplist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/oplist.c b/src/oplist.c
index b3b782f..df12fb3 100644
--- a/src/oplist.c
+++ b/src/oplist.c
@@ -851,6 +851,7 @@ PLIST_API int plist_from_openstep(const char *plist_ostep, uint32_t length, plis
} else if (ctx.pos < ctx.end && *ctx.pos == '=') {
/* attempt to parse this as 'strings' data */
plist_free(*plist);
+ *plist = NULL;
plist_t pl = plist_new_dict();
ctx.pos = plist_ostep;
parse_dict_data(&ctx, pl);