Skip to content

Commit 2e93bb7

Browse files
committed
Fixed possible use after free
1 parent c40231a commit 2e93bb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/opcache/zend_persist.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
484484
op_array->vars = zend_shared_alloc_get_xlat_entry(op_array->vars);
485485
ZEND_ASSERT(op_array->vars != NULL);
486486
}
487+
if (op_array->dynamic_func_defs) {
488+
op_array->dynamic_func_defs = zend_shared_alloc_get_xlat_entry(op_array->dynamic_func_defs);
489+
ZEND_ASSERT(op_array->dynamic_func_defs != NULL);
490+
}
487491
ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE(zend_extensions_op_array_persist(op_array, ZCG(mem))));
488492
return;
489493
}

0 commit comments

Comments
 (0)