com php-src: Revert "We should not silently go on if the required size can not be met.": Zend/zend_hash.c
| From: | Xinchen Hui | Date: | Wed, 12 Aug 2015 08:44:18 +0000 |
| Subject: | com php-src: Revert "We should not silently go on if the required size can not be met.": Zend/zend_hash.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88488@lists.php.net to get a copy of this message | ||
Commit: 60b75eb9ed77cb9f8080a07f3d8228ac66176cec
Author: Xinchen Hui <laruence@php.net> Wed, 12 Aug 2015 16:44:18 +0800
Parents: d2bcdec980e31d876bdcc4cfb59392fdf215badb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=60b75eb9ed77cb9f8080a07f3d8228ac66176cec
Log:
Revert "We should not silently go on if the required size can not be met."
This reverts commit d2bcdec980e31d876bdcc4cfb59392fdf215badb.
Changed paths:
M Zend/zend_hash.c
Diff:
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index b8cd435..96ed679 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -98,11 +98,6 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
/* Use big enough power of 2 */
/* size should be between HT_MIN_SIZE and HT_MAX_SIZE */
nSize = (nSize <= HT_MIN_SIZE ? HT_MIN_SIZE : (nSize >= HT_MAX_SIZE ? HT_MAX_SIZE : nSize));
- if (nSize < HT_MIN_SIZE) {
- nSize = HT_MIN_SIZE;
- } else if (UNEXPECTED(nSize >= HT_MAX_SIZE)) {
- zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu +
%zu)", nSize, sizeof(Bucket), sizeof(Bucket));
- }
#if defined(ZEND_WIN32)
if (BitScanReverse(&index, nSize - 1)) {