From: Zeev Suraski Date: Tue, 18 Jul 2000 20:08:06 +0000 (+0000) Subject: This is probably the oldest bug in PHP :) X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~229 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a650dd8a19fc2b9562bfad52d9e2f70bb19777c9;p=php This is probably the oldest bug in PHP :) Luckily it's unlikely we're ever actually bitten by this bug. --- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 979705fa40..88dd1cc0f0 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -123,7 +123,8 @@ static void _zend_is_inconsistent(HashTable *ht, char *file, int line) /* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */ static uint PrimeNumbers[] = -{5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793, 2097397, 4194103, 8388857, 16777447, 33554201, 67108961, 134217487, 268435697, 536870683, 1073741621, 2147483399}; + {5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793, 2097397, 4194103, 8388857, 16777447, 33554201, 67108961, 134217487, 268435697, 536870683, 1073741621, 2147483399}; +static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(uint); #define ZEND_HASH_IF_FULL_DO_RESIZE(ht) \ if ((ht)->nNumOfElements > (ht)->nTableSize) { \ @@ -132,7 +133,6 @@ static uint PrimeNumbers[] = static int zend_hash_do_resize(HashTable *ht); -static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(ulong); ZEND_API ulong hashpjw(char *arKey, uint nKeyLength) {