php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35716 parse_ini crashes trying to parse flie
Submitted: 2005-12-16 23:05 UTC Modified: 2005-12-16 23:18 UTC
From: john@php.net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.1 OS: RHAS3 (in Vmware)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: john@php.net
New email:
PHP Version: OS:

 

 [2005-12-16 23:05 UTC] john@php.net
Description:
------------
Okay, so PHP is segfaulting for no apparent reason trying to parse a simple .ini file... bt follows...

Breaks with PHP 5.0.4 and 5.1.1


Reproduce code:
---------------
Can't really provide a small snippet, part of framework app...

BT:

#0  virtual_file_ex (state=0xbf6001b8,
    path=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", verify_path=0, use_realpath=1)
    at /root/php-5.0.4/TSRM/tsrm_virtual_cwd.c:296
#1  0xb7161758 in expand_filepath (
    filepath=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", real_path=0x0)
    at /root/php-5.0.4/main/fopen_wrappers.c:538
#2  0xb716e0ed in _php_stream_fopen (
    filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb", opened_path=0xbf6023f8,
    options=133) at /root/php-5.0.4/main/streams/plain_wrapper.c:844
#3  0xb716e891 in _php_stream_fopen_with_path (
    filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb",
    path=0x817c250 "/home/adteractive/php_framework_v2-1/libs/PEAR/",
    opened_path=0xbf6023f8, options=133)
    at /root/php-5.0.4/main/streams/plain_wrapper.c:1259
#4  0xb716bb1e in _php_stream_open_wrapper_ex (
    path=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", mode=0xb71cc5d1 "rb", options=141, opened_path=0x85,
    context=0x0) at /root/php-5.0.4/main/streams/streams.c:1657
#5  0xb715cdb4 in php_stream_open_for_zend (
#6  0xb7195813 in zend_stream_open (
    filename=0x8c25c84 "/home/adteractive/php_verticals_v2/education/commons/configs/DefaultEdu/flow.ini", handle=0xbf6023f0)
    at /root/php-5.0.4/Zend/zend_stream.c:41
#7  0xb71958cc in zend_stream_fixup (file_handle=0xbf6023f0)
    at /root/php-5.0.4/Zend/zend_stream.c:56
#8  0xb717924c in zend_ini_open_file_for_scanning (fh=0xbf6023f0)
    at Zend/zend_ini_scanner.c:550
#9  0xb7178c80 in zend_parse_ini_file (fh=0xbf6023f0,
    unbuffered_errors=0 '\0', ini_parser_cb=0, arg=0x0)
    at Zend/zend_ini_parser.c:171
#10 0xb71117ff in zif_parse_ini_file (ht=0, return_value=0x8c25d0c,
    this_ptr=0x0, return_value_used=1)
    at /root/php-5.0.4/ext/standard/basic_functions.c:3103


Expected result:
----------------
Not to segfault....

Actual result:
--------------
Boom.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-16 23:18 UTC] rasmus@php.net
Not a very useful bug report
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC