summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-21 01:18:28 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-21 01:18:28 +0000
commit6aec52bde7b7f070320552e584e7cc02ca527b59 (patch)
tree9b6751b5e5ff9d800812ef0cb5bed696a0148c8c
parent1783b0e4815714efa29294041e57290cd20e0cab (diff)
downloadphp-git-6aec52bde7b7f070320552e584e7cc02ca527b59.tar.gz
MFH
-rw-r--r--ext/standard/html.c8
-rw-r--r--main/streams/memory.c1
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c
index f2a6f72aa1..0358b4a827 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -948,7 +948,8 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot yet handle MBCS!");
- return 0;
+ efree(ret);
+ return NULL;
}
if (php_memnstr(ret, entity, entity_length, ret+retlen)) {
@@ -1308,7 +1309,10 @@ PHP_FUNCTION(html_entity_decode)
}
replaced = php_unescape_html_entities(str, str_len, &len, 1, quote_style, hint_charset TSRMLS_CC);
- RETVAL_STRINGL(replaced, len, 0);
+ if (replaced) {
+ RETURN_STRINGL(replaced, len, 0);
+ }
+ RETURN_FALSE;
}
/* }}} */
diff --git a/main/streams/memory.c b/main/streams/memory.c
index 8d7247c7d7..6190713d9f 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -673,7 +673,6 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha
if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) {
/* store data */
php_stream_temp_write(stream, comma, ilen TSRMLS_CC);
- efree(comma);
php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC);
/* set special stream stuff (enforce exact mode) */
vlen = strlen(mode);