Search
j0ke.net Open Build Service
>
Projects
>
home:netmax
:
rebuilds
>
php4
> php-4.3.9-CVE-2007-0988.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-4.3.9-CVE-2007-0988.patch of Package php4
--- php-4.3.9/Zend/zend_hash.c.zhash64 +++ php-4.3.9/Zend/zend_hash.c @@ -178,11 +178,16 @@ SET_INCONSISTENT(HT_OK); - while ((1U << i) < nSize) { - i++; + if (nSize >= 0x80000000) { + /* prevent overflow */ + ht->nTableSize = 0x80000000; + } else { + while ((1U << i) < nSize) { + i++; + } + ht->nTableSize = 1 << i; } - ht->nTableSize = 1 << i; ht->nTableMask = ht->nTableSize - 1; ht->pDestructor = pDestructor; ht->pListHead = NULL;