felipe          Wed Mar 19 03:00:41 2008 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/standard/tests/serialize       bug43614.phpt 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       var_unserializer.c var_unserializer.re 
  Log:
  Fixed bug #43614 (incorrect processing of numerical string keys of array in 
arbitrary serialized data)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1121&r2=1.2027.2.547.2.1122&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1121 php-src/NEWS:1.2027.2.547.2.1122
--- php-src/NEWS:1.2027.2.547.2.1121    Tue Mar 18 23:32:42 2008
+++ php-src/NEWS        Wed Mar 19 03:00:40 2008
@@ -12,6 +12,8 @@
 - Fixed bug #44373 (PDO_OCI extension compile failed). (Felipe)
 - Fixed bug #43677 (Inconsistent behaviour of include_path set with
   php_value). (manuel at mausz dot at)
+- Fixed bug #43614 (incorrect processing of numerical string keys of array in 
+  arbitrary serialized data). (Dmitriy Buldakov, Felipe)
 - Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" 
comes 
   again...). (Felipe)
 - Fixed bug #41828 (Failing to call RecursiveIteratorIterator::__construct() 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.70.2.4.2.7&r2=1.70.2.4.2.8&diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7 
php-src/ext/standard/var_unserializer.c:1.70.2.4.2.8
--- php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7        Mon Aug  6 
18:33:29 2007
+++ php-src/ext/standard/var_unserializer.c     Wed Mar 19 03:00:40 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: var_unserializer.c,v 1.70.2.4.2.7 2007/08/06 18:33:29 jani Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.8 2008/03/19 03:00:40 felipe Exp $ */
 
 #include "php.h"
 #include "ext/standard/php_var.h"
@@ -290,10 +290,10 @@
                                zend_hash_index_update(ht, Z_LVAL_P(key), 
&data, sizeof(data), NULL);
                                break;
                        case IS_STRING:
-                               if (zend_hash_find(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
+                               if (zend_symtable_find(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
                                        var_push_dtor(var_hash, old_data);
                                }
-                               zend_hash_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
+                               zend_symtable_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
                                break;
                }
                
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.52.2.2.2.6&r2=1.52.2.2.2.7&diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.52.2.2.2.6 
php-src/ext/standard/var_unserializer.re:1.52.2.2.2.7
--- php-src/ext/standard/var_unserializer.re:1.52.2.2.2.6       Mon Aug  6 
18:23:16 2007
+++ php-src/ext/standard/var_unserializer.re    Wed Mar 19 03:00:40 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: var_unserializer.re,v 1.52.2.2.2.6 2007/08/06 18:23:16 jani Exp $ */
+/* $Id: var_unserializer.re,v 1.52.2.2.2.7 2008/03/19 03:00:40 felipe Exp $ */
 
 #include "php.h"
 #include "ext/standard/php_var.h"
@@ -294,10 +294,10 @@
                                zend_hash_index_update(ht, Z_LVAL_P(key), 
&data, sizeof(data), NULL);
                                break;
                        case IS_STRING:
-                               if (zend_hash_find(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
+                               if (zend_symtable_find(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) {
                                        var_push_dtor(var_hash, old_data);
                                }
-                               zend_hash_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
+                               zend_symtable_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
                                break;
                }
                

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/serialize/bug43614.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/serialize/bug43614.phpt
+++ php-src/ext/standard/tests/serialize/bug43614.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to