Bug #77589 [Opn->Csd]: Core dump using parse_ini_string with numeric sections

From: Date: Mon, 11 Feb 2019 07:35:43 +0000
Subject: Bug #77589 [Opn->Csd]: Core dump using parse_ini_string with numeric sections
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219489@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77589&edit=1 ID: 77589 Updated by: laruence@php.net Reported by: public at joaquinfernandez dot net Summary: Core dump using parse_ini_string with numeric sections -Status: Open +Status: Closed Type: Bug Package: Filesystem function related Operating System: Linux PHP Version: 7.3.2 Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=92055ca79b821d0712ed67b8173d2312e7e9fdbd Log: Fixed bug #77589 (Core dump using parse_ini_string with numeric sections) Previous Comments: ------------------------------------------------------------------------ [2019-02-08 19:36:01] public at joaquinfernandez dot net 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 this bug report at https://bugs.php.net/bug.php?id=77589&edit=1

« previous php.bugs (#219489) next »