From: Ilia Alshanetsky Date: Thu, 2 Jan 2003 19:50:37 +0000 (+0000) Subject: MFH X-Git-Tag: PHP_4_3_before_13561_fix~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4fc15408937f7363fd8099dbb24269ea1b49af4;p=php MFH --- diff --git a/ext/standard/html.c b/ext/standard/html.c index fe2cf57a81..29f544435a 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -674,6 +674,9 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new ret = estrdup(old); retlen = oldlen; + if (!retlen) { + goto empty_source; + } if (all) { /* look for a match in the maps for this charset */ @@ -722,7 +725,7 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new efree(ret); ret = replaced; } - +empty_source: *newlen = retlen; return ret; }