diff --git a/uri.c b/uri.c index 15cb92b37..14ad94eca 100644 --- a/uri.c +++ b/uri.c @@ -1644,6 +1644,8 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) { if (str[0] == 0) return(xmlStrdup(str)); len = xmlStrlen(str); + if (len == 0) + return(NULL); len += 20; ret = xmlMalloc(len);