[php-src] PR #24181: ext/fileinfo: fix use after free when streams reconstruct file info
| From: | DanielEScherzer | Date: | Wed, 07 Oct 2026 20:29:26 +0000 |
| Subject: | [php-src] PR #24181: ext/fileinfo: fix use after free when streams reconstruct file info | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39242@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24181
Author: DanielEScherzer
In
php_fileinfo_from_path(), add an option to delay retrieving the
magic_set until it is needed, after user callbacks are run, by passing in the
zval holding the magic, rather than the magic set directly. Additionally, reload local
magic variables after calling php_fileinfo_from_path(), since user callbacks may have
run.