[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c
nlopess Sun Jun 24 11:41:12 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/simplexml simplexml.c Log: fix memleak in sxe_prop_dim_read() #found by coverity http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.28r2=1.151.2.22.2.29diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.28 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.29 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.28 Wed Jun 13 13:38:26 2007 +++ php-src/ext/simplexml/simplexml.c Sun Jun 24 11:41:12 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.28 2007/06/13 13:38:26 dmitry Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.29 2007/06/24 11:41:12 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -271,9 +271,6 @@ name = Z_STRVAL_P(member); } - MAKE_STD_ZVAL(return_value); - ZVAL_NULL(return_value); - GET_NODE(sxe, node); if (sxe-iter.type == SXE_ITER_ATTRLIST) { @@ -294,6 +291,9 @@ } } + MAKE_STD_ZVAL(return_value); + ZVAL_NULL(return_value); + if (node) { if (attribs) { if (Z_TYPE_P(member) != IS_LONG || sxe-iter.type == SXE_ITER_ATTRLIST) { @@ -2419,7 +2419,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.28 $); + php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.29 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
nlopess Sun Jun 24 11:43:34 2007 UTC Modified files: /php-src/ext/simplexml simplexml.c Log: MFB:fix memleak in sxe_prop_dim_read() http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.234r2=1.235diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.234 php-src/ext/simplexml/simplexml.c:1.235 --- php-src/ext/simplexml/simplexml.c:1.234 Wed Jun 13 13:38:59 2007 +++ php-src/ext/simplexml/simplexml.c Sun Jun 24 11:43:34 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.234 2007/06/13 13:38:59 dmitry Exp $ */ +/* $Id: simplexml.c,v 1.235 2007/06/24 11:43:34 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -271,9 +271,6 @@ name = Z_STRVAL_P(member); } - MAKE_STD_ZVAL(return_value); - ZVAL_NULL(return_value); - GET_NODE(sxe, node); if (sxe-iter.type == SXE_ITER_ATTRLIST) { @@ -294,6 +291,9 @@ } } + MAKE_STD_ZVAL(return_value); + ZVAL_NULL(return_value); + if (node) { if (attribs) { if (Z_TYPE_P(member) != IS_LONG || sxe-iter.type == SXE_ITER_ATTRLIST) { @@ -2474,7 +2474,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.234 $); + php_info_print_table_row(2, Revision, $Revision: 1.235 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c
iliaa Sun Jun 24 17:37:01 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard array.c /php-srcNEWS Log: Fixed bug #41685 (array_push() fails to warn when next index is already occupied). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.29r2=1.308.2.21.2.30diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.29 php-src/ext/standard/array.c:1.308.2.21.2.30 --- php-src/ext/standard/array.c:1.308.2.21.2.29Mon Jun 18 16:53:09 2007 +++ php-src/ext/standard/array.cSun Jun 24 17:37:01 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.29 2007/06/18 16:53:09 iliaa Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.30 2007/06/24 17:37:01 iliaa Exp $ */ #include php.h #include php_ini.h @@ -1957,7 +1957,11 @@ new_var = *args[i]; new_var-refcount++; - zend_hash_next_index_insert(Z_ARRVAL_P(stack), new_var, sizeof(zval *), NULL); + if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), new_var, sizeof(zval *), NULL) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot add element to the array as the next element is already occupied); + efree(args); + RETURN_FALSE; + } } /* Clean up and return the number of values in the stack */ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.795r2=1.2027.2.547.2.796diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.795 php-src/NEWS:1.2027.2.547.2.796 --- php-src/NEWS:1.2027.2.547.2.795 Fri Jun 22 00:10:02 2007 +++ php-src/NEWSSun Jun 24 17:37:01 2007 @@ -43,6 +43,8 @@ - Fixed bug #41717 (imagepolygon does not respect thickness). (Pierre) - Fixed bug #41686 (Omitting length param in array_slice not possible). (Ilia) +- Fixed bug #41685 (array_push() fails to warn when next index is already + occupied). (Ilia) - Fixed bug #41655 (open_basedir bypass via glob()). (Ilia) - Fixed bug #41640 (get_class_vars produces error on class constants). (Johannes) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php