cvs: ZendEngine2 / zend_API.c

From: Date: Sat, 26 Jul 2008 18:32:39 +0000
Subject: cvs: ZendEngine2 / zend_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6949@lists.php.net to get a copy of this message
dmitry Sat Jul 26 18:32:39 2008 UTC Modified files: /ZendEngine2 zend_API.c Log: Added checks for destroied objects http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.478&r2=1.479&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.478 ZendEngine2/zend_API.c:1.479 --- ZendEngine2/zend_API.c:1.478 Sat Jul 26 13:14:55 2008 +++ ZendEngine2/zend_API.c Sat Jul 26 18:32:39 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.478 2008/07/26 13:14:55 dmitry Exp $ */ +/* $Id: zend_API.c,v 1.479 2008/07/26 18:32:39 dmitry Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -2996,6 +2996,15 @@ fcc->calling_scope = NULL; fcc->object_pp = NULL; + if (object_pp && (!*object_pp || Z_TYPE_PP(object_pp) != IS_OBJECT)) { + object_pp = NULL; + } + if (object_pp && Z_TYPE_PP(object_pp) == IS_OBJECT && + (!EG(objects_store).object_buckets || + !EG(objects_store).object_buckets[Z_OBJ_HANDLE_PP(object_pp)].valid)) { + return 0; + } + switch (Z_TYPE_P(callable)) { case IS_STRING: case IS_UNICODE: @@ -3144,6 +3153,11 @@ return 0; } } else { + if (!EG(objects_store).object_buckets || + !EG(objects_store).object_buckets[Z_OBJ_HANDLE_PP(obj)].valid) { + return 0; + } + fcc->calling_scope = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */ fcc->object_pp = obj;

« previous php.zend-engine.cvs (#6949) next »