cvs: ZendEngine2 / zend_reflection_api.c
| From: | Marcus Boerger | Date: | Wed, 09 Jun 2004 19:25:43 +0000 |
| Subject: | cvs: ZendEngine2 / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2685@lists.php.net to get a copy of this message | ||
helly Wed Jun 9 15:25:43 2004 EDT
Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
Fix Bug #28694 ReflectionExtension::getFunctions() crashes PHP
http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.106&r2=1.107&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.106 ZendEngine2/zend_reflection_api.c:1.107
--- ZendEngine2/zend_reflection_api.c:1.106 Mon May 31 17:49:52 2004
+++ ZendEngine2/zend_reflection_api.c Wed Jun 9 15:25:42 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.106 2004/05/31 21:49:52 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.107 2004/06/09 19:25:42 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -185,6 +185,7 @@
if (intern->free_ptr && intern->ptr) {
efree(intern->ptr);
+ intern->ptr = NULL;
}
if (intern->obj) {
zval_ptr_dtor(&intern->obj);
@@ -221,6 +222,7 @@
intern->zo.in_set = 0;
intern->ptr = NULL;
intern->obj = NULL;
+ intern->free_ptr = 0;
ALLOC_HASHTABLE(intern->zo.properties);
zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
@@ -848,7 +850,7 @@
reflection_instanciate(reflection_function_ptr, object TSRMLS_CC);
intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC);
intern->ptr = function;
- intern->free_ptr = function != NULL;
+ intern->free_ptr = 0;
zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **)
&name, sizeof(zval *), NULL);
}
/* }}} */