1
0
mirror of https://github.com/php/php-src.git synced 2026-04-13 02:52:48 +02:00

Fixed incorrect reallocation

This commit is contained in:
Dmitry Stogov
2018-10-17 17:44:03 +03:00
parent f307e5962f
commit a0a1c8990e

View File

@@ -178,7 +178,9 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class
new_entry->prototype = ARENA_REALLOC(new_entry->prototype);
}
}
ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache)));
if (IN_ARENA(ZEND_MAP_PTR(new_entry->run_time_cache))) {
ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache)));
}
ZEND_MAP_PTR_INIT(new_entry->static_variables_ptr, &new_entry->static_variables);
}
}