iliaa Tue Oct 5 19:55:22 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/ftp ftp.c Log: MFH: Fixed bug #30027 (Possible crash inside ftp_get()). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.738&r2=1.1247.2.739&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.738 php-src/NEWS:1.1247.2.739 --- php-src/NEWS:1.1247.2.738 Mon Oct 4 16:44:07 2004 +++ php-src/NEWS Tue Oct 5 19:55:21 2004 @@ -11,6 +11,8 @@ - Fixed bug #30224 (Sybase date strings are sometimes not null terminated). (Ilia) - Fixed bug #30057 (did not detect IPV6 on FreeBSD 4.1). (Wez) +- Fixed bug #30027 (Possible crash inside ftp_get()). + (cfield at affinitysolutions dot com - Fixed bug #29805 (HTTP Authentication Issues). (Uwe Schindler) - Fixed bug #28325 (Circular references not properly serialised). (Moriyoshi) - Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry) http://cvs.php.net/diff.php/php-src/ext/ftp/ftp.c?r1=1.68.2.17&r2=1.68.2.18&ty=u Index: php-src/ext/ftp/ftp.c diff -u php-src/ext/ftp/ftp.c:1.68.2.17 php-src/ext/ftp/ftp.c:1.68.2.18 --- php-src/ext/ftp/ftp.c:1.68.2.17 Wed Mar 31 15:44:04 2004 +++ php-src/ext/ftp/ftp.c Tue Oct 5 19:55:21 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.68.2.17 2004/03/31 20:44:04 iliaa Exp $ */ +/* $Id: ftp.c,v 1.68.2.18 2004/10/05 23:55:21 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -727,12 +727,12 @@ ptr = s; } #else - while ((s = memchr(ptr, '\r', (e - ptr)))) { + while (e > ptr && (s = memchr(ptr, '\r', (e - ptr)))) { php_stream_write(outstream, ptr, (s - ptr)); if (*(s + 1) == '\n') { s++; + php_stream_putc(outstream, '\n'); } - php_stream_putc(outstream, '\n'); ptr = s + 1; } #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php