Commit 8e4b7a59 authored by Nikias Bassen's avatar Nikias Bassen

xplist: Fix OOB heap buffer read with empty data nodes

Credit to OSS-Fuzz
parent b1be1e99
......@@ -1103,8 +1103,10 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth)
goto err_out;
}
size_t size = tp->length;
data->buff = base64decode(str_content, &size);
data->length = size;
if (size > 0) {
data->buff = base64decode(str_content, &size);
data->length = size;
}
if (requires_free) {
free(str_content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment