Bug #69551 [Opn]: parse_ini_file() and parse_ini_string() segmentation fault

From: Date: Thu, 30 Apr 2015 13:35:50 +0000
Subject: Bug #69551 [Opn]: parse_ini_file() and parse_ini_string() segmentation fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192425@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69551&edit=1 ID: 69551 User updated by: nystrom dot lars dot egon at gmail dot com Reported by: nystrom dot lars dot egon at gmail dot com Summary: parse_ini_file() and parse_ini_string() segmentation fault Status: Open Type: Bug Package: Filesystem function related Operating System: Linux PHP Version: 5.6.8 Block user comment: N Private report: N New Comment: Here's a better test script: <?php $a = '[Network.eth0] SubnetMask = "' . "\x0A\x1B" . '"'; parse_ini_string($a, false, \INI_SCANNER_RAW); Previous Comments: ------------------------------------------------------------------------ [2015-04-30 13:29:33] nystrom dot lars dot egon at gmail dot com Description: ------------ This bug affects both parse_ini_file() and parse_ini_string(). If you try to parse a string which contains a line feed followed by an escape character PHP will crash with a segmentation fault. This only happens when using the INI_SCANNER_RAW mode. With "line feed followed by escape character" I mean two bytes with the following values: 0x0A 0x1B. This affects all version of PHP I've tried: PHP 5.6.8, PHP 5.5.24 and PHP 5.3.29. Test script: --------------- <?php $a = '[Network.eth0] SubnetMask = " "'; parse_ini_string($a, false, \INI_SCANNER_RAW); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69551&edit=1

« previous php.bugs (#192425) next »