|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34307 OnUpdateStringUnempty INI options can be set empty
Submitted: 2005-08-30 14:24 UTC Modified: 2005-09-02 23:27 UTC
From: michael at zend dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS, 4CVS, 6CVS (2005-09-02 OS: *
Private report: No CVE-ID: None
 [2005-08-30 14:24 UTC] michael at zend dot com
mbstring crashes when arg_separator.input == ""

Reproduce code:

Actual result:
michael@gibraltar [~/phprepos/php-5.1.0]--> ./sapi/cli/php -c ./ -q test.php
Segmentation fault

michael@gibraltar [~/phprepos/php-5.1.0]--> cat php.ini


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-30 14:32 UTC] michael at zend dot com
(gdb) r -c ./ -q test.php 
Starting program: /home/michael/phprepos/php-5.1.0/sapi/cli/php -c ./ -q test.php

Program received signal SIGSEGV, Segmentation fault.
0x08101649 in _php_mb_encoding_handler_ex (info=0xbfffce40, arg=0x0, res=0x8616854 "1")
    at /home/michael/phprepos/php-5.1.0/ext/mbstring/mb_gpc.c:223
223                     for (s2=info->separator; *s2 != '\0'; s2++) {
(gdb) bt
#0  0x08101649 in _php_mb_encoding_handler_ex (info=0xbfffce40, arg=0x0, res=0x8616854 "1")
    at /home/michael/phprepos/php-5.1.0/ext/mbstring/mb_gpc.c:223
#1  0x080f9f67 in zif_mb_parse_str (ht=1, return_value=0x862336c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /home/michael/phprepos/php-5.1.0/ext/mbstring/mbstring.c:1396
#2  0x082f5bf9 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffcf50) at zend_vm_execute.h:184
#3  0x082f8c09 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfffcf50) at zend_vm_execute.h:1586
#4  0x082f587a in execute (op_array=0x8623bcc) at zend_vm_execute.h:87
#5  0x082caa35 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/michael/phprepos/php-5.1.0/Zend/zend.c:1078
#6  0x08280d98 in php_execute_script (primary_file=0xbffff3c0) at /home/michael/phprepos/php-5.1.0/main/main.c:1672
#7  0x083430e4 in main (argc=5, argv=0xbffff494) at /home/michael/phprepos/php-5.1.0/sapi/cli/php_cli.c:1039

'./configure' \
'--enable-mbstring' \
'--disable-cgi' \
'--enable-debug' \
 [2005-08-31 08:33 UTC]
This is interesting since you shouldn't even be able to set that option as empty..

 [2005-09-02 23:27 UTC]
Fixed properly now. (thanks to Andrei)

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC