From: Anatol Belski Date: Tue, 23 Dec 2014 16:02:45 +0000 (+0100) Subject: fix NULL deref when the script encoding wasn't previously set X-Git-Tag: PRE_PHP7_REMOVALS~35^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2e5ed06d1e6a7cc0c7148ada9768a0c0aa16313;p=php fix NULL deref when the script encoding wasn't previously set --- diff --git a/Zend/zend.c b/Zend/zend.c index ad05f3b5dd..6913d51193 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()) {