com php-src: fix NULL deref when the script encoding wasn't previously set: Zend/zend.c
| From: | Anatol Belski | Date: | Tue, 23 Dec 2014 16:09:13 +0000 |
| Subject: | com php-src: fix NULL deref when the script encoding wasn't previously set: Zend/zend.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83841@lists.php.net to get a copy of this message | ||
Commit: e2e5ed06d1e6a7cc0c7148ada9768a0c0aa16313
Author: Anatol Belski <ab@php.net> Tue, 23 Dec 2014 17:02:45 +0100
Parents: 106b1017d44580a37a191378f6cb03374b942807
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2e5ed06d1e6a7cc0c7148ada9768a0c0aa16313
Log:
fix NULL deref when the script encoding wasn't previously set
Changed paths:
M Zend/zend.c
Diff:
diff --git a/Zend/zend.c b/Zend/zend.c
index ad05f3b..6913d51 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -89,7 +89,7 @@ static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
static ZEND_INI_MH(OnUpdateScriptEncoding) /* {{{ */
{
- if (!CG(multibyte)) {
+ if (!CG(multibyte) || !new_value) {
return FAILURE;
}
if (!zend_multibyte_get_functions()) {