[php-src] PR #25882: Fix NULL dereference in php_init_config() for unresolvable search pat…
| From: | jorgsowa | Date: | Sat, 28 Nov 2026 19:32:42 +0000 |
| Subject: | [php-src] PR #25882: Fix NULL dereference in php_init_config() for unresolvable search pat… | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41170@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25882
Author: jorgsowa
Follow-up to #24139 / #24141 (c88c89e351c2cce6c98d908e8ac5093060685d81), which fixed this for
-c naming a file directly, but not for the search path lookups of
php-<sapi>.ini and php.ini.
php_fopen_with_path() can open the file and still leave opened_path NULL
when the cwd plus the relative path exceeds MAXPATHLEN. php_init_config() then takes
ZSTR_VAL(NULL) and zend_stream_init_fp() crashes in strlen().
The file is now rejected in that case, as in the -c <file> branch.