efreet xml parse - handle 0 sized xml specially to avoid crash

fixes T4493
This commit is contained in:
Carsten Haitzler 2016-09-20 14:01:59 +09:00
parent 41c332b726
commit 07ffb2e5c5
1 changed files with 2 additions and 0 deletions

View File

@ -221,6 +221,8 @@ efreet_xml_parse(char **data, int *size, int *error)
Efreet_Xml *xml, *sub_xml;
const char *tag = NULL;
if (*size <= 0) return NULL;
/* parse this tag */
if (!efreet_xml_tag_parse(data, size, &(tag), error)) return NULL;
xml = NEW(Efreet_Xml, 1);