com php-src: improve fix for bug #71273: main/main.c

From: Date: Tue, 05 Jan 2016 19:03:05 +0000
Subject: com php-src: improve fix for bug #71273: main/main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90518@lists.php.net to get a copy of this message
Commit: 1dc395c8c45a6b5f69eff8319cd8b9a1b0a88894 Author: Anatol Belski <ab@php.net> Tue, 5 Jan 2016 20:03:05 +0100 Parents: 8d630f7d15fead8a76a96d56c97e5ca2852207b1 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1dc395c8c45a6b5f69eff8319cd8b9a1b0a88894 Log: improve fix for bug #71273 Bugs: https://bugs.php.net/71273 Changed paths: M main/main.c Diff: diff --git a/main/main.c b/main/main.c index bc978d9..77a2f64 100644 --- a/main/main.c +++ b/main/main.c @@ -724,7 +724,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ if (PG(html_errors)) { replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, NULL); /* Retry with substituting invalid chars on fail. */ - if (!replace_buffer) { + if (!replace_buffer || ZSTR_LEN(replace_buffer) < 1) { replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT | ENT_HTML_SUBSTITUTE_ERRORS, NULL); }

« previous php.cvs (#90518) next »