diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-02 19:50:37 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-02 19:50:37 +0000 |
commit | c4fc15408937f7363fd8099dbb24269ea1b49af4 (patch) | |
tree | 66bd17d234bc3a44530c105da94a590ce4fd6c3f | |
parent | de38a0eca422d722da33c9e4657801e89d346956 (diff) | |
download | php-git-c4fc15408937f7363fd8099dbb24269ea1b49af4.tar.gz |
MFH
-rw-r--r-- | ext/standard/html.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |