summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-01-02 19:50:37 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-01-02 19:50:37 +0000
commitc4fc15408937f7363fd8099dbb24269ea1b49af4 (patch)
tree66bd17d234bc3a44530c105da94a590ce4fd6c3f
parentde38a0eca422d722da33c9e4657801e89d346956 (diff)
downloadphp-git-c4fc15408937f7363fd8099dbb24269ea1b49af4.tar.gz
MFH
-rw-r--r--ext/standard/html.c5
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;
}