]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Thu, 2 Jan 2003 19:50:37 +0000 (19:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 2 Jan 2003 19:50:37 +0000 (19:50 +0000)
ext/standard/html.c

index fe2cf57a81373c342c26a8cc7d54176e803301b7..29f544435a6eb1a746ad65efe5967192a214e224 100644 (file)
@@ -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;
 }