[php-src] PR #25692: Fix GH-25691: Crash on nested parse_ini_file() from a stream wrapper
| From: | lazerg | Date: | Tue, 24 Nov 2026 02:36:29 +0000 |
| Subject: | [php-src] PR #25692: Fix GH-25691: Crash on nested parse_ini_file() from a stream wrapper | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40942@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25692
Author: lazerg
A user stream wrapper runs PHP code while
zend_parse_ini_file() opens the file. A
nested parse_ini_file() or parse_ini_string() there left
CG(ini_parser_param) pointing at its own dead stack frame, and with sections enabled it
also left BG(active_ini_file_section) pointing into its own result array. The outer
parse then used both.
CG(ini_parser_param) is now set after the file is opened, and
parse_ini_file()/parse_ini_string() restore the previous active section
when they return.
Fixes #25691