com php-src: Fixed NULL pointer dereferencing: Zend/zend_clos ures.c

From: Date: Fri, 28 Feb 2014 12:16:15 +0000
Subject: com php-src: Fixed NULL pointer dereferencing: Zend/zend_clos ures.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77770@lists.php.net to get a copy of this message
Commit: cb7797a43c03d2ced07842647a5bb186a88d6473 Author: Dmitry Stogov <dmitry@zend.com> Fri, 28 Feb 2014 16:16:15 +0400 Parents: 08d9a4ffa22417a0e82bc4b8eb93c41c0efd2063 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb7797a43c03d2ced07842647a5bb186a88d6473 Log: Fixed NULL pointer dereferencing Changed paths: M Zend/zend_closures.c Diff: diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index a8f2be3..8f60e67 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -431,7 +431,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent closure->func = *func; closure->func.common.prototype = NULL; - if ((scope == NULL) && (Z_TYPE_P(this_ptr) != IS_UNDEF)) { + if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) { /* use dummy scope if we're binding an object without specifying a scope */ /* maybe it would be better to create one for this purpose */ scope = zend_ce_closure;

« previous php.cvs (#77770) next »