mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-17162: zend_array_try_init() with dtor can cause engine UAF
This commit is contained in:
commit
08b14a57b8
3 changed files with 27 additions and 1 deletions
|
@ -1485,7 +1485,10 @@ static zend_always_inline zval *zend_try_array_init_size(zval *zv, uint32_t size
|
|||
}
|
||||
zv = &ref->val;
|
||||
}
|
||||
zval_ptr_dtor(zv);
|
||||
zval garbage;
|
||||
ZVAL_COPY_VALUE(&garbage, zv);
|
||||
ZVAL_NULL(zv);
|
||||
zval_ptr_dtor(&garbage);
|
||||
ZVAL_ARR(zv, arr);
|
||||
return zv;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue