#24098 [NEW]: pathinfo crashes

From: Date: Mon, 09 Jun 2003 15:57:37 +0000
Subject: #24098 [NEW]: pathinfo crashes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-41539@lists.php.net to get a copy of this message
From: spotter at mail dot ee Operating system: Suse 8.2 PHP version: 5CVS-2003-06-09 (dev) PHP Bug Type: Reproducible crash Bug description: pathinfo crashes Function pathinfo() crashes on simple call. For example <? pathinfo("/dsds.asa") ?> gives segfault. Following little fix wont crash anymore: # diff ext/standard/string.c.old ext/standard/string.c 1271d1270 < int ret_len; And a backtrace: Starting program: /root/php5/sapi/cli/php /data/docroot/test.php Program received signal SIGSEGV, Segmentation fault. 0x4016fb74 in memcpy () from /lib/libc.so.6 (gdb) bt #0 0x4016fb74 in memcpy () from /lib/libc.so.6 #1 0x40014020 in __libc_missing_32bit_uids () from /lib/ld-linux.so.2 #2 0x081594ce in add_assoc_stringl_ex (arg=0x8228a24, key=0x818672e "extension", key_len=10, str=0x8228a81 "asa", length=136541059, duplicate=1) at /root/php5old/Zend/zend_API.c:763 #3 0x080f09c4 in zif_pathinfo (ht=1, return_value=0x8228a04, this_ptr=0x0, return_value_used=1) at /root/php5old/ext/standard/string.c:1283 #4 0x0816c2f0 in zend_do_fcall_common_helper (execute_data=0xbfffc580, op_array=0x82331fc) at /root/php5old/Zend/zend_execute.c:2596 #5 0x0816c83f in zend_do_fcall_handler (execute_data=0xbfffc580, op_array=0x82331fc) at /root/php5old/Zend/zend_execute.c:2724 #6 0x08168594 in execute (op_array=0x82331fc) at /root/php5old/Zend/zend_execute.c:1244 #7 0x08157c2a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php5old/Zend/zend.c:1017 #8 0x08124ad9 in php_execute_script (primary_file=0xbfffe980) at /root/php5old/main/main.c:1678 #9 0x08172caa in main (argc=2, argv=0xbfffea14) at /root/php5old/sapi/cli/php_cli.c:909 #10 0x401078ae in __libc_start_main () from /lib/libc.so.6 test.php is: <? print_r(pathinfo("/dsds.asa")); ?> -- Edit bug report at http://bugs.php.net/?id=24098&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24098&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24098&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24098&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24098&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24098&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24098&r=support Expected behavior: http://bugs.php.net/fix.php?id=24098&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24098&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24098&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24098&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24098&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24098&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24098&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24098&r=gnused

« previous php.bugs (#41539) next »