]> granicus.if.org Git - php/commitdiff
Use the same error msg with resize
authorXinchen Hui <laruence@php.net>
Wed, 12 Aug 2015 08:46:57 +0000 (16:46 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 12 Aug 2015 08:46:57 +0000 (16:46 +0800)
Zend/zend_hash.c

index d010dff360310f1652405f567a09432a319a7b0c..2347f99432e5443be93420457363ada0f089e1e0 100644 (file)
@@ -100,7 +100,7 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
        if (nSize < HT_MIN_SIZE) {
                nSize = HT_MIN_SIZE;
        } else if (UNEXPECTED(nSize >= HT_MAX_SIZE)) {
-               zend_error_noreturn(E_ERROR, "Array size is too big", nSize);
+               zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nSize, sizeof(Bucket), sizeof(Bucket));
        }
 
 #if defined(ZEND_WIN32)