From 8f1baa6e1ceffb54529402e210e6397466e1049a Mon Sep 17 00:00:00 2001 From: Julien Pauli Date: Wed, 29 Jul 2015 10:02:39 +0200 Subject: Adjust Git-Rules --- README.GIT-RULES | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.GIT-RULES b/README.GIT-RULES index 843c61ea63..c1c256dcf1 100644 --- a/README.GIT-RULES +++ b/README.GIT-RULES @@ -12,7 +12,7 @@ Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following some basic rules with regards to Git usage will:: a. Make everybody happier, especially those responsible for maintaining - Git itself. + PHP itself. b. Keep the changes consistently well documented and easily trackable. @@ -48,11 +48,11 @@ Currently we have the following branches in use:: PHP-5.6 Is used to release the PHP 5.6.x series. This is a current stable version and is open for bugfixes only. - PHP-5.5 Is used to release the PHP 5.5.x series. This is a current - stable version and is open for bugfixes only. + PHP-5.5 Is used to release the PHP 5.5.x series. This is an old + stable version and is open for security fixes only. - PHP-5.4 Is used to release the PHP 5.4.x series. This is a current - stable version and is open for bugfixes only. + PHP-5.4 Is used to release the PHP 5.4.x series. This is an old + stable version and is open for security fixes only. PHP-5.3 This branch is closed. @@ -67,7 +67,7 @@ Currently we have the following branches in use:: The next few rules are more of a technical nature:: - 1. All changes should first go to the lowest branch (i.e. 5.4) and then + 1. All changes should first go to the lowest branch (i.e. 5.6) and then get merged up to all other branches. If a change is not needed for later branches (i.e. fixes for features which where dropped from later branches) an empty merge should be done. -- cgit v1.2.1 From 7fc04937f5ba48e05d311937477ba81b0e07ffa8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 Jun 2015 16:39:23 +0200 Subject: Fixed bug #69892 --- NEWS | 3 +++ Zend/tests/bug69892.phpt | 10 ++++++++++ Zend/zend_hash.c | 5 ++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/bug69892.phpt diff --git a/NEWS b/NEWS index ab5f07dd19..544346f6a2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2015 PHP 5.4.44 +. Fixed bug #69892 (Different arrays compare indentical due to integer key + truncation). (Nikita) + 09 Jul 2015 PHP 5.4.43 - Core: diff --git a/Zend/tests/bug69892.phpt b/Zend/tests/bug69892.phpt new file mode 100644 index 0000000000..d14f85fa52 --- /dev/null +++ b/Zend/tests/bug69892.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #69892: Different arrays compare indentical due to integer key truncation +--SKIPIF-- + +--FILE-- + 0] === [0x100000000 => 0]); +?> +--EXPECT-- +bool(false) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index bfff87a67e..9b3fb746af 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1513,11 +1513,10 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co } if (ordered) { if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */ - result = p1->h - p2->h; - if (result!=0) { + if (p1->h != p2->h) { HASH_UNPROTECT_RECURSION(ht1); HASH_UNPROTECT_RECURSION(ht2); - return result; + return p1->h > p2->h ? 1 : -1; } } else { /* string indices */ result = p1->nKeyLength - p2->nKeyLength; -- cgit v1.2.1