|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-06-09 13:12 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
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")); ?>