cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SEGV when reusing a connection while varying ftp_filemethod option

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 7 Jul 2008 22:36:26 +0200 (CEST)

On Mon, 7 Jul 2008, Scott Barrett wrote:

> I've run afoul of some of the directory handling logic in ftp.c. When
> reusing connections while changing the value of the FTP_FILEMETHOD option, a
> previously deallocated dirs array in the ftp_conn structure gets used,
> resulting in a SEGV.
>
> Following is a patch (against the version of ftp.c in 7.18.2) and a test
> program (hacked from the lib500.c test case) that demonstrates the problem
> with an unpatched ftp.c.

Thanks a lot. Gold plated bonus points for providing such a swell test case. I
made it become the new test case 539 and it verifies your patch fine (I got
the crash before I applied it).

Committed just now.

-- 
  / daniel.haxx.se
Received on 2008-07-07