[php-src] Issue #25189: bug: parse_ini_string accepts \x00

From: Date: Wed, 04 Nov 2026 13:42:31 +0000
Subject: [php-src] Issue #25189: bug: parse_ini_string accepts \x00
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-254010@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/25189 Author: HackingRepo ### Description The following code: ```php <?php $a = parse_ini_string("a=b\x00c", true, INI_SCANNER_RAW); print_r( $a ); ``` Resulted in this output: ``` Array ( [a] => b ) ``` But I expected this output instead: all the rest of the config ignored after \x00, this indicates C truncating things and not treating the null byte as just like any other byte ### PHP Version ```plain PHP 8.5.4 (cli) (built: Oct 19 2026 14:35:18) (NTS) Copyright (c) The PHP Group Built by Ubuntu Zend Engine v4.5.4, Copyright (c) Zend Technologies with Zend OPcache v8.5.4, Copyright (c), by Zend Technologies ``` ### Operating System Ubuntu 26.04

« previous php.bugs (#254010) next »