com php-src: Fix bug #68166 We can't always efree here php_escape_html_entities can return an interned _empty_string: main/main.c
| From: | Rasmus Lerdorf | Date: | Sun, 22 Feb 2015 16:25:56 +0000 |
| Subject: | com php-src: Fix bug #68166 We can't always efree here php_escape_html_entities can return an interned _empty_string: main/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85053@lists.php.net to get a copy of this message | ||
Commit: a9ba407ce16809a2a70724bcd481b64ba8bd550b
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Sun, 22 Feb 2015 08:14:41 -0800
Parents: 8f6a013c972c40e923b2519226521144b347cce0
Branches: PHP-5.5
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a9ba407ce16809a2a70724bcd481b64ba8bd550b
Log:
Fix bug #68166
We can't always efree here
php_escape_html_entities can return an interned_empty_string
Bugs:
https://bugs.php.net/68166
Changed paths:
M main/main.c
Diff:
diff --git a/main/main.c b/main/main.c
index 5e56400..733786e 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1087,7 +1087,7 @@ static void php_error_cb(int type, const char *error_filename, const uint
error_
size_t len;
char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL
TSRMLS_CC);
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line
<b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buf,
error_filename, error_lineno, STR_PRINT(append_string));
- efree(buf);
+ str_efree(buf);
} else {
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line
<b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buffer,
error_filename, error_lineno, STR_PRINT(append_string));
}