pollita Thu Feb 13 14:51:03 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS /php4/ext/ftp ftp.c Log: MFH(Bug 22059, ftp.c-r1.77) Index: php4/NEWS diff -u php4/NEWS:1.1247.2.84 php4/NEWS:1.1247.2.85 --- php4/NEWS:1.1247.2.84 Thu Feb 13 12:27:28 2003 +++ php4/NEWS Thu Feb 13 14:51:01 2003 @@ -30,6 +30,7 @@ - Fixed bug #22103 (Added gdImageEllipse and replaced old gdImageFilledEllipse with a better implementation). (Pierre) - Fixed bug #22088 (array_shift() left next index to be +1 too much). (Jani) +- Fixed buf #22059 (ftp_chdir() causes segfault). (Sara) - Fixed bug #22048 (crash in imap_header() when the e-mail contains an abnormally large number of special characters). (Ilia) - Fixed bug #22042 (pg_result_seek() would never seek to the 1st row in the Index: php4/ext/ftp/ftp.c diff -u php4/ext/ftp/ftp.c:1.68.2.3 php4/ext/ftp/ftp.c:1.68.2.4 --- php4/ext/ftp/ftp.c:1.68.2.3 Mon Jan 6 22:53:56 2003 +++ php4/ext/ftp/ftp.c Thu Feb 13 14:51:02 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.68.2.3 2003/01/07 03:53:56 iliaa Exp $ */ +/* $Id: ftp.c,v 1.68.2.4 2003/02/13 19:51:02 pollita Exp $ */ #include "php.h" @@ -421,8 +421,8 @@ { if (ftp == NULL) return 0; - - efree(ftp->pwd); + if (ftp->pwd) + efree(ftp->pwd); ftp->pwd = NULL; if (!ftp_putcmd(ftp, "CWD", dir)) @@ -442,7 +442,8 @@ if (ftp == NULL) return 0; - efree(ftp->pwd); + if (ftp->pwd) + efree(ftp->pwd); ftp->pwd = NULL; if (!ftp_putcmd(ftp, "CDUP", NULL))
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php