[GIT-PULLS] [php-src] PR #22696: Fix use-after-free in extract() EXTR_REFS collision modes
[email protected] (iliaal)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <6JrLAV3exviuK0ZqmVqAYBb9Wk8Tiq3nbsrcFUbr4AE@main.internal.php.net> |
Pull Request: https://github.com/php/php-src/pull/22696 Author: iliaal The GH-18209 fix guarded `php_extract_ref_overwrite` against a destructor freeing the extract target during the reference write, but the five sibling EXTR_REFS collision paths still drop the old value before writing the reference. The added test crashes on master through the EXTR_IF_EXISTS and EXTR_PREFIX_ALL paths; the fix copies the old value aside and drops it after the write, matching `php_extract_ref_overwrite`. Fixes GH-18209