]> granicus.if.org Git - php/commitdiff
fix NULL deref when the script encoding wasn't previously set
authorAnatol Belski <ab@php.net>
Tue, 23 Dec 2014 16:02:45 +0000 (17:02 +0100)
committerAnatol Belski <ab@php.net>
Tue, 23 Dec 2014 16:09:13 +0000 (17:09 +0100)
Zend/zend.c

index ad05f3b5dd3c5e5494d3d8b3a4c917d6b82f7cb4..6913d511937f5e26eea45654a6d23f1df0929ad0 100644 (file)
@@ -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()) {