From: Moriyoshi Koizumi Date: Sun, 29 Feb 2004 05:21:36 +0000 (+0000) Subject: - Bugfix #27287 (wddx segfaults during deserialization) X-Git-Tag: RELEASE_0_2_0~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d83a4db042880d47f53a609681c00a0a0e49d05;p=php - Bugfix #27287 (wddx segfaults during deserialization) --- diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index b5dbf7c50f..e1006d47a2 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -883,7 +883,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) st_entry *ent1, *ent2; wddx_stack *stack = (wddx_stack *)user_data; HashTable *target_hash; - zend_class_entry *ce; + zend_class_entry **pce; zval *obj; zval *tmp; TSRMLS_FETCH(); @@ -945,15 +945,14 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) zend_str_tolower(Z_STRVAL_P(ent1->data), Z_STRLEN_P(ent1->data)); if (zend_hash_find(EG(class_table), Z_STRVAL_P(ent1->data), - Z_STRLEN_P(ent1->data)+1, (void **) &ce)==FAILURE) { + Z_STRLEN_P(ent1->data)+1, (void **) &pce)==FAILURE) { incomplete_class = 1; - ce = PHP_IC_ENTRY; + pce = &PHP_IC_ENTRY; } /* Initialize target object */ MAKE_STD_ZVAL(obj); - INIT_PZVAL(obj); - object_init_ex(obj, ce); + object_init_ex(obj, *pce); /* Merge current hashtable with object's default properties */ zend_hash_merge(Z_OBJPROP_P(obj),