com php-src: Fixed bug #69017 (Fail to push to the empty array with the constant value defined in class scope): NEWS Zend/zend_hash .c

From: Date: Thu, 12 Feb 2015 02:59:28 +0000
Subject: com php-src: Fixed bug #69017 (Fail to push to the empty array with the constant value defined in class scope): NEWS Zend/zend_hash .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84828@lists.php.net to get a copy of this message
Commit: f2940b7120a0dc77ccfaacceed04faaa68b4dc23 Author: Xinchen Hui <laruence@php.net> Thu, 12 Feb 2015 10:59:28 +0800 Parents: e6d8bad618b17b67ae4faff5c87721c2d755c71d Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2940b7120a0dc77ccfaacceed04faaa68b4dc23 Log: Fixed bug #69017 (Fail to push to the empty array with the constant value defined in class scope) Bugs: https://bugs.php.net/69017 Changed paths: M NEWS M Zend/zend_hash.c Diff: diff --git a/NEWS b/NEWS index 9ddaef5..3276731 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2015, PHP 5.5.23 +- Core: + . Fixed bug #69017 (Fail to push to the empty array with the constant value + defined in class scope). (Laruence) + - ODBC: . Bug #68964 (Allowed memory size exhausted with odbc_exec). (Anatol) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 1fab471..b18fd59 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1415,6 +1415,9 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const if (key_type == HASH_KEY_IS_LONG) { p->h = num_index; + if ((long)num_index >= (long)ht->nNextFreeElement) { + ht->nNextFreeElement = num_index < LONG_MAX ? num_index + 1 : LONG_MAX; + } } else { p->h = h; p->nKeyLength = str_length;

« previous php.cvs (#84828) next »