dmitry Wed Jun 8 11:48:27 2005 EDT
Modified files: (Branch: PHP_5_0)
/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.191.2.6&r2=1.191.2.7&ty=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.191.2.6
php-src/ext/standard/var.c:1.191.2.7
--- php-src/ext/standard/var.c:1.191.2.6 Wed Jun 1 06:53:25 2005
+++ php-src/ext/standard/var.c Wed Jun 8 11:48:26 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.191.2.6 2005/06/01 10:53:25 dmitry Exp $ */
+/* $Id: var.c,v 1.191.2.7 2005/06/08 15:48:26 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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php