[php-src] PR #24023: main: Ignore array-valued INI entries where a string is expected
| From: | iliaal | Date: | Wed, 30 Sep 2026 15:38:39 +0000 |
| Subject: | [php-src] PR #24023: main: Ignore array-valued INI entries where a string is expected | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39002@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24023
Author: iliaal
Array syntax such as memory_limit[] = 5M stores an array in the configuration hash, and in the
[PATH=]/[HOST=] and .user.ini hashes, but four readers treat every value as a string:
php_ini_activate_config(), zend_register_ini_entries_ex(), ${} expansion in the INI parser, and
cfg_get_string(). The array's arData pointer then becomes the string length, so a .user.ini
entry kills the request with a multi-terabyte allocation failure and a top-level php.ini or -d entry
crashes PHP at startup. These readers now skip non-string values, which is the same fallback startup
already uses when a value is rejected.