cvs: ZendEngine2 / zend_API.c
"Dmitry Stogov" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvsdmitry1217097159@cvsserver> |
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;
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php