Bug #70157 [NEW]: parse_ini_string() segmentation fault with INI_SCANNER_TYPED

From: Date: Tue, 28 Jul 2015 12:31:26 +0000
Subject: Bug #70157 [NEW]: parse_ini_string() segmentation fault with INI_SCANNER_TYPED
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194776@lists.php.net to get a copy of this message
From:             publikusmail at postafiok dot hu
Operating system: *
PHP version:      7.0.0beta2
Package:          Filesystem function related
Bug Type:         Bug
Bug description:parse_ini_string() segmentation fault with INI_SCANNER_TYPED

Description:
------------
This bug affects both parse_ini_file() and parse_ini_string()
functions.

A string value starting with a number and without quotes causes
segmentation fault, whenever mode is set to INI_SCANNER_TYPED.

PHP versions tested: 5.6.9, 7.0.0b2
OS tested: Debian 8.1, Windows 8.1

Test script:
---------------
<?php

$ini = "

[agatha.christie]
title = 10 little indians

";

var_dump(parse_ini_string($ini, true, INI_SCANNER_TYPED));

?>

Expected result:
----------------
array(1) {
  ["agatha.christie"]=>
  array(1) {
    ["title"]=>
    string(17) "10 little indians"
  }
}

Actual result:
--------------
segmentation fault

-- 
Edit bug report at https://bugs.php.net/bug.php?id=70157&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=70157&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=70157&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=70157&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=70157&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=70157&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=70157&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=70157&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=70157&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=70157&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=70157&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=70157&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=70157&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=70157&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70157&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=70157&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=70157&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=70157&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70157&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=70157&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=70157&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#194776) next »