Skip to content

Commit cc0c4e4

Browse files
author
Sterling Hughes
committed
This shouldn't be refcount = 0, causes a memory overrun
1 parent 60d161a commit cc0c4e4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/simplexml/simplexml.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ static zval *
9797
sxe_property_read(zval *object, zval *member TSRMLS_DC)
9898
{
9999
zval *return_value;
100-
zval *value;
100+
zval *value = NULL;
101101
php_sxe_object *sxe;
102102
char *name;
103103
char *contents;
104-
char *mapname = NULL;
105104
xmlNodePtr node;
106105
xmlAttrPtr attr;
107106
int counter = 0;
@@ -122,7 +121,6 @@ sxe_property_read(zval *object, zval *member TSRMLS_DC)
122121
APPEND_PREV_ELEMENT(counter, value);
123122

124123
MAKE_STD_ZVAL(value);
125-
value->refcount = 0;
126124
contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, attr->children, 1);
127125
ZVAL_STRING(value, contents, 0);
128126
APPEND_CUR_ELEMENT(counter, value);

0 commit comments

Comments
 (0)