Bug #77589 [NEW]: Core dump using parse_ini_string with numeric sections

From: Date: Fri, 08 Feb 2019 19:36:01 +0000
Subject: Bug #77589 [NEW]: Core dump using parse_ini_string with numeric sections
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219449@lists.php.net to get a copy of this message
From: public at joaquinfernandez dot net Operating system: Linux PHP version: 7.3.2 Package: Filesystem function related Bug Type: Bug Bug description:Core dump using parse_ini_string with numeric sections Description: ------------ If ini string has numeric sections and INI_SCANNER_TYPED options is used, then i get segmentation fault. But if numeric sections are enclosed in quotes (["0"], ["1"], etc) then no problem occurs. Test script: --------------- var_dump( parse_ini_string( <<<INI [0] a = 1 b = "2" c = true [1] a = 0 b = "abc" c = false INI, TRUE, INI_SCANNER_TYPED ) ); Expected result: ---------------- array(2) { [0] => array(3) { 'a' => int(1) 'b' => string(1) "2" 'c' => bool(true) } [1] => array(3) { 'a' => int(0) 'b' => string(3) "abc" 'c' => bool(false) } } Actual result: -------------- Segmentation fault -- Edit bug report at https://bugs.php.net/bug.php?id=77589&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77589&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77589&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77589&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77589&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77589&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77589&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77589&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77589&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77589&r=support Expected behavior: https://bugs.php.net/fix.php?id=77589&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77589&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77589&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77589&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77589&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77589&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77589&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77589&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77589&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77589&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77589&r=mysqlcfg

« previous php.bugs (#219449) next »