From:             bjori at jeshus dot com
Operating system: FreeBSD 5.2.1
PHP version:      5.0.0
PHP Bug Type:     Reproducible crash
Bug description:  opendir() with ftp:// wrapper segfaults if path doesnt have trailing 
slash

Description:
------------
When trying to use opendir() with ftp:// wrapper ( without trailing slash
) php segmentation faults. Would have expected an error message from
opendir().


Sounds like http://bugs.php.net/bug.php?id=386 which is fixed..?

Reproduce code:
---------------
<?php
$url = 'ftp://anonymous:[EMAIL PROTECTED]';
$dir = opendir ( $url );
var_dump ( $dir );
?>


Expected result:
----------------
opendir() should return error.

Actual result:
--------------
PHP crashes.

#0  0x080ebafa in _php_stream_write ()
#1  0x080c6891 in php_stream_ftp_opendir ()
#2  0x080ecefe in _php_stream_opendir ()
#3  0x08086b87 in _php_do_opendir ()
#4  0x08086c5e in zif_opendir ()
#5  0x0813a19c in zend_do_fcall_common_helper ()
#6  0x0813a7b6 in zend_do_fcall_handler ()
#7  0x0813687f in execute ()
#8  0x081170c9 in zend_execute_scripts ()
#9  0x080dc7b6 in php_execute_script ()
#10 0x081429db in main ()
#11 0x08062fb2 in _start ()


-- 
Edit bug report at http://bugs.php.net/?id=29678&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29678&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29678&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29678&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29678&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29678&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29678&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29678&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29678&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29678&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29678&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29678&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29678&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29678&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29678&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29678&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29678&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29678&r=float

Reply via email to