cvs: php-src /ext/standard var.c

From: Date: Wed, 08 Jun 2005 15:48:15 +0000
Subject: cvs: php-src /ext/standard var.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-32164@lists.php.net to get a copy of this message
dmitry Wed Jun 8 11:48:15 2005 EDT Modified files: /php-src/ext/standard var.c Log: Fixed incorrect usage of zend_mangle_property_name() (valgrind errors) http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.199&r2=1.200&ty=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.199 php-src/ext/standard/var.c:1.200 --- php-src/ext/standard/var.c:1.199 Wed Jun 1 07:03:42 2005 +++ php-src/ext/standard/var.c Wed Jun 8 11:48:12 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.199 2005/06/01 11:03:42 dmitry Exp $ */ +/* $Id: var.c,v 1.200 2005/06/08 15:48:12 dmitry Exp $ */ /* {{{ includes @@ -584,18 +584,18 @@ do { zend_mangle_property_name(&priv_name, &prop_name_length, ce->name, ce->name_length, - Z_STRVAL_PP(name), Z_STRLEN_PP(name) + 1, ce->type & ZEND_INTERNAL_CLASS); - if (zend_hash_find(Z_OBJPROP_PP(struc), priv_name, prop_name_length, (void *) &d) == SUCCESS) { - php_var_serialize_string(buf, priv_name, prop_name_length-1); + Z_STRVAL_PP(name), Z_STRLEN_PP(name), ce->type & ZEND_INTERNAL_CLASS); + if (zend_hash_find(Z_OBJPROP_PP(struc), priv_name, prop_name_length+1, (void *) &d) == SUCCESS) { + php_var_serialize_string(buf, priv_name, prop_name_length); efree(priv_name); php_var_serialize_intern(buf, d, var_hash TSRMLS_CC); break; } efree(priv_name); zend_mangle_property_name(&prot_name, &prop_name_length, "*", 1, - Z_STRVAL_PP(name), Z_STRLEN_PP(name) + 1, ce->type & ZEND_INTERNAL_CLASS); - if (zend_hash_find(Z_OBJPROP_PP(struc), prot_name, prop_name_length, (void *) &d) == SUCCESS) { - php_var_serialize_string(buf, prot_name, prop_name_length - 1); + Z_STRVAL_PP(name), Z_STRLEN_PP(name), ce->type & ZEND_INTERNAL_CLASS); + if (zend_hash_find(Z_OBJPROP_PP(struc), prot_name, prop_name_length+1, (void *) &d) == SUCCESS) { + php_var_serialize_string(buf, prot_name, prop_name_length); efree(prot_name); php_var_serialize_intern(buf, d, var_hash TSRMLS_CC); break;

« previous php.cvs (#32164) next »