diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index cf0f9e5b332c4..21423199ab2e2 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -118,7 +118,7 @@ static zend_always_inline uint32_t zend_hash_check_size(uint32_t nSize) /* size should be between HT_MIN_SIZE and HT_MAX_SIZE */ if (nSize <= HT_MIN_SIZE) { return HT_MIN_SIZE; - } else if (UNEXPECTED(nSize >= HT_MAX_SIZE)) { + } else if (UNEXPECTED(nSize > HT_MAX_SIZE)) { zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%u * %zu + %zu)", nSize, sizeof(Bucket), sizeof(Bucket)); }