1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 06:02:23 +02:00

Merge branch 'PHP-5.5'

* PHP-5.5:
  Fixed crash during search in empty persistent HashTable
This commit is contained in:
Dmitry Stogov
2013-05-29 00:01:35 +04:00

View File

@@ -52,6 +52,10 @@ typedef void (*zend_persist_func_t)(void * TSRMLS_DC);
static void zend_persist_zval_ptr(zval **zp TSRMLS_DC);
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
static const Bucket *uninitialized_bucket = NULL;
#endif
static void zend_hash_persist(HashTable *ht, void (*pPersistElement)(void *pElement TSRMLS_DC), size_t el_size TSRMLS_DC)
{
Bucket *p = ht->pListHead;
@@ -129,7 +133,7 @@ static void zend_hash_persist(HashTable *ht, void (*pPersistElement)(void *pElem
zend_accel_store(ht->arBuckets, sizeof(Bucket*) * ht->nTableSize);
#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
} else {
ht->arBuckets = NULL;
ht->arBuckets = (Bucket**)&uninitialized_bucket;
}
#endif
}