[php-src] PR #25192: ext/standard: Fix the parse_ini_string() length guard
| From: | iliaal | Date: | Wed, 04 Nov 2026 17:13:46 +0000 |
| Subject: | [php-src] PR #25192: ext/standard: Fix the parse_ini_string() length guard | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40297@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25192
Author: iliaal
The
INT_MAX check in parse_ini_string() set the return value without
returning, and its size_t subtraction wrapped above INT_MAX, so it never rejected
anything. The INI scanner tracks lengths as unsigned int, so strings over UINT_MAX were
parsed truncated; return false for those instead. No test, since triggering it needs a string over 4
GiB.