From 0e5da5b8bc8861f4c21521d154c4ef5d3cd96609 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 7 Jul 2008 20:37:07 +0000 Subject: - Scott Barrett provided a test case for a segfault in the FTP code and the fix for it. It occured when you did a FTP transfer using CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being cleared properly. Scott's test case is now known as test 539 and it verifies the fix. --- lib/ftp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/ftp.c b/lib/ftp.c index ba24376fe..819772b92 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -279,6 +279,7 @@ static void freedirs(struct ftp_conn *ftpc) } free(ftpc->dirs); ftpc->dirs = NULL; + ftpc->dirdepth = 0; } if(ftpc->file) { free(ftpc->file); -- cgit v1.2.3