From 62b03b85a56a7b98e6eef237deeff1a8b41f8fb8 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 9 Jan 2023 19:01:14 +0100 Subject: oplist: Fix use-after-free by setting free'd pointer to NULL Credit to OSS-Fuzz --- src/oplist.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.1-32-gdbae