[php-src] PR #24535: Fix GH-24531: Crash when flushing a renamed zip-based phar
| From: | iliaal | Date: | Thu, 22 Oct 2026 13:00:11 +0000 |
| Subject: | [php-src] PR #24535: Fix GH-24531: Crash when flushing a renamed zip-based phar | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39696@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24535
Author: iliaal
FlowFusion reported a NULL dereference in phar_zip_changed_apply_int() when a cached zip-based phar
is modified after its file was renamed. phar_zip_flush() reopens the archive by name and gets NULL,
and unmodified entries were then copied from that stream. Flushing now throws the existing
"unable to copy contents" PharException, as tar and native phar archives already throw in
the same case.
Reproduced on a PHP-8.4 debug CLI build: segfault before, PharException after.
Fixes #24531