]> granicus.if.org Git - php/commitdiff
Make array_merge(_recursive) handle binary keys safely. (Patch by Matt W)
authorAndrei Zmievski <andrei@php.net>
Sun, 30 Jul 2006 03:31:18 +0000 (03:31 +0000)
committerAndrei Zmievski <andrei@php.net>
Sun, 30 Jul 2006 03:31:18 +0000 (03:31 +0000)
ext/standard/array.c

index 163db160ae5c2a297599390112efc4a097bc39e1..800bbddd8c0b20fe65ab056338c6e39d14488bf9 100644 (file)
@@ -2328,7 +2328,7 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS
                                } else {
                                        (*src_entry)->refcount++;
 
-                                       zend_hash_update(dest, string_key, strlen(string_key)+1,
+                                       zend_hash_update(dest, string_key, string_key_len,
                                                                         src_entry, sizeof(zval *), NULL);
                                }
                                break;