From: Xinchen Hui Date: Mon, 17 Mar 2014 04:05:52 +0000 (+0800) Subject: Fixed NULL pointer dereference X-Git-Tag: POST_PHPNG_MERGE~412^2~295 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=466dbfee888a52d0bd4918321f072516e2065f0d;p=php Fixed NULL pointer dereference --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 20d644d804..c6fa805d98 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2983,7 +2983,11 @@ ZEND_METHOD(reflection_method, invokeArgs) fcc.function_handler = mptr; fcc.calling_scope = obj_ce; fcc.called_scope = intern->ce; - ZVAL_COPY_VALUE(&fcc.object, object); + if (object) { + ZVAL_COPY_VALUE(&fcc.object, object); + } else { + ZVAL_UNDEF(&fcc.object); + } /* * Copy the zend_function when calling via handler (e.g. Closure::__invoke())