[prev in list] [next in list] [prev in thread] [next in thread]
List: php-internals
Subject: [PHP-DEV] array_merge[_recursive] is not binary-key safe (patch)
From: "Matt W" <php_lists () realplain ! com>
Date: 2006-07-28 1:14:05
Message-ID: 005b01c6b1e3$1ecb2480$0201a8c0 () pc1
[Download RAW message or body]
Hi,
Happened to notice this. Only in 5.2.
Thanks,
Matt
["array_merge_binkey.diff.txt" (text/plain)]
Index: ext/standard/array.c
===================================================================
RCS file: /repository/php-src/ext/standard/array.c,v
retrieving revision 1.308.2.21.2.8
diff -u -r1.308.2.21.2.8 array.c
--- ext/standard/array.c 24 Jul 2006 18:18:33 -0000 1.308.2.21.2.8
+++ ext/standard/array.c 28 Jul 2006 01:00:00 -0000
@@ -2328,7 +2328,7 @@
} 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;
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic