tony2001 Wed Apr 12 15:13:57 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/xmlrpc xmlrpc-epi-php.c /php-src NEWS Log: fix #37057 (xmlrpc_decode() may produce arrays with numeric strings which are unaccessible) http://cvs.php.net/viewcvs.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.4&r2=1.39.2.5&diff_format=u Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.4 php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5 --- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.4 Sun Jan 1 12:50:16 2006 +++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Wed Apr 12 15:13:56 2006 @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xmlrpc-epi-php.c,v 1.39.2.4 2006/01/01 12:50:16 sniper Exp $ */ +/* $Id: xmlrpc-epi-php.c,v 1.39.2.5 2006/04/12 15:13:56 tony2001 Exp $ */ /********************************************************************** * BUGS: * @@ -300,7 +300,13 @@ { if (list && val) { if (id) { - return zend_hash_update(Z_ARRVAL_P(list), (char*) id, strlen(id) + 1, (void *) val, sizeof(zval **), NULL); + int id_len = strlen(id); + if (!(id_len > 1 && id[0] == '0') && is_numeric_string((char *)id, id_len, NULL, NULL, 0) == IS_LONG) { + long index = strtol(id, NULL, 0); + return zend_hash_index_update(Z_ARRVAL_P(list), index, (void *) val, sizeof(zval **), NULL); + } else { + return zend_hash_update(Z_ARRVAL_P(list), (char*) id, strlen(id) + 1, (void *) val, sizeof(zval **), NULL); + } } else { return zend_hash_next_index_insert(Z_ARRVAL_P(list), (void *) val, sizeof(zval **), NULL); } http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.508&r2=1.2027.2.509&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.508 php-src/NEWS:1.2027.2.509 --- php-src/NEWS:1.2027.2.508 Wed Apr 12 13:37:51 2006 +++ php-src/NEWS Wed Apr 12 15:13:57 2006 @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Apr 2006, PHP 5.1.3 +- Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings, + which are unaccessible). (Tony) - Fixed bug #37055 (incorrect reference counting for persistent OCI8 connections). (Tony) - Fixed bug #37053 (html_errors with internal classes produces wrong links).
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php