cvs: php-src(PHP_5_0) / NEWS /ext/standard ftp_fopen_wrapper.c

From: Date: Mon, 16 Aug 2004 01:41:17 +0000
Subject: cvs: php-src(PHP_5_0) / NEWS /ext/standard ftp_fopen_wrapper.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28342@lists.php.net to get a copy of this message
iliaa Sun Aug 15 21:41:17 2004 EDT Modified files: (Branch: PHP_5_0) /php-src NEWS /php-src/ext/standard ftp_fopen_wrapper.c Log: MFH: Fixed bug #29678 (opendir() with ftp:// wrapper segfaults if path does not have trailing slash). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.41&r2=1.1760.2.42&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.41 php-src/NEWS:1.1760.2.42 --- php-src/NEWS:1.1760.2.41 Fri Aug 13 12:27:35 2004 +++ php-src/NEWS Sun Aug 15 21:41:16 2004 @@ -3,6 +3,8 @@ ?? ??? 2004, PHP 5.0.2 - Added PHP_EOL constant that contains the OS way of representing newlines. (Paul Hudson, Derick) +- Fixed bug #29678 (opendir() with ftp:// wrapper segfaults if path does not + have trailing slash). (Ilia) - Fixed bug #29656 (segfault on result and statement properties) (Georg) 12 Aug 2004, PHP 5.0.1 http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.74&r2=1.74.2.1&ty=u Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.74 php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.1 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.74 Mon May 17 16:31:59 2004 +++ php-src/ext/standard/ftp_fopen_wrapper.c Sun Aug 15 21:41:17 2004 @@ -18,7 +18,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.74 2004/05/17 20:31:59 pollita Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.74.2.1 2004/08/16 01:41:17 iliaa Exp $ */ #include "php.h" #include "php_globals.h" @@ -126,8 +126,12 @@ char tmp_line[512]; resource = php_url_parse(path); - if (resource == NULL || resource->path == NULL) + if (resource == NULL || resource->path == NULL) { + if (resource && presource) { + *presource = resource; + } return NULL; + } use_ssl = resource->scheme && (strlen(resource->scheme) > 3) && resource->scheme[3] == 's'; @@ -647,6 +651,9 @@ unsigned short portno; stream = php_ftp_fopen_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_ssl_on_data TSRMLS_CC); + if (!stream) { + goto opendir_errexit; + } /* set the connection to be ascii */ php_stream_write_string(stream, "TYPE A\r\n");

« previous php.cvs (#28342) next »