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) ...@@ -1103,8 +1103,10 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth)
goto err_out; goto err_out;
} }
size_t size = tp->length; size_t size = tp->length;
if (size > 0) {
data->buff = base64decode(str_content, &size); data->buff = base64decode(str_content, &size);
data->length = size; data->length = size;
}
if (requires_free) { if (requires_free) {
free(str_content); 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