commit | 8e4b7a591c6a31b960d6e9e769c8efe15751df97 | [log] [tgz] |
---|---|---|
author | Nikias Bassen <nikias@gmx.li> | Thu Feb 09 23:06:13 2017 +0100 |
committer | Nikias Bassen <nikias@gmx.li> | Thu Feb 09 23:06:13 2017 +0100 |
tree | 3642a8bca2f9d86fa06b0e5501902209a207f830 | |
parent | b1be1e99dd1f489720e83d018bcbdb91fb1e87e5 [diff] |
xplist: Fix OOB heap buffer read with empty data nodes Credit to OSS-Fuzz
diff --git a/src/xplist.c b/src/xplist.c index f5ddddd..0e9b007 100644 --- a/src/xplist.c +++ b/src/xplist.c
@@ -1103,8 +1103,10 @@ 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);