helly Fri Dec 23 20:32:15 2005 EDT
Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_execute.c
/php-src/ext/simplexml/tests bug35785.phpt
Log:
- MFH Fixed Bug #35785 (SimpleXML memory read error)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.7&r2=1.716.2.8&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.7
ZendEngine2/zend_execute.c:1.716.2.8
--- ZendEngine2/zend_execute.c:1.716.2.7 Thu Dec 22 09:16:11 2005
+++ ZendEngine2/zend_execute.c Fri Dec 23 20:32:15 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.7 2005/12/22 09:16:11 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.8 2005/12/23 20:32:15 helly Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -548,7 +548,7 @@
make_real_object(object_ptr TSRMLS_CC); /* this should modify object
only if it's empty */
object = *object_ptr;
- if (object->type != IS_OBJECT || (opcode == ZEND_ASSIGN_OBJ &&
!Z_OBJ_HT_P(object)->write_property)) {
+ if (!object || object->type != IS_OBJECT || (opcode == ZEND_ASSIGN_OBJ
&& !Z_OBJ_HT_P(object)->write_property)) {
zend_error(E_WARNING, "Attempt to assign property of
non-object");
FREE_OP(free_op2);
if (!RETURN_VALUE_UNUSED(result)) {
http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/tests/bug35785.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/simplexml/tests/bug35785.phpt
diff -u php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.2
php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.3
--- php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.2 Fri Dec 23 20:26:41 2005
+++ php-src/ext/simplexml/tests/bug35785.phpt Fri Dec 23 20:32:15 2005
@@ -13,10 +13,11 @@
<?php exit(0); __halt_compiler(); ?>
--EXPECTF--
-Notice: Undefined index: name in %sbug35785.phpt on line %d
+Notice: Undefined index: name in %sbug35785.php on line %d
-Strict Standards: Creating default object from empty value in %sbug35785.phpt
on line %d
+Strict Standards: Creating default object from empty value in %sbug35785.php
on line %d
-Warning: Attempt to assign property of non-object in %sbug35785.phpt on line %d
+Warning: Attempt to assign property of non-object in %sbug35785.php on line %d
<?xml version="1.0"?>
<root/>
+===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php