From: hno <> Date: Sun, 4 Apr 2004 20:47:06 +0000 (+0000) Subject: Bug #853: SIGSEGV on FTP PUT X-Git-Tag: SQUID_3_0_PRE4~1110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2501274696e0b42bbf01c1ba8caa211bc1554777;p=thirdparty%2Fsquid.git Bug #853: SIGSEGV on FTP PUT If a FTP PUT request is aborted while Squid is writing data to the server then Squid may abort with a segmentation fault. --- diff --git a/src/ftp.cc b/src/ftp.cc index a15fbe72a7..8c8e823332 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.355 2003/09/07 16:53:37 hno Exp $ + * $Id: ftp.cc,v 1.356 2004/04/04 14:47:06 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2717,6 +2717,9 @@ ftpDataWriteCallback(int fd, char *buf, size_t size, comm_err_t err, int xerrno, { FtpStateData *ftpState = (FtpStateData *) data; + if (err == COMM_ERR_CLOSING) + return; + if (!err) { /* Shedule the rest of the request */ clientReadBody(ftpState->request, ftpState->data.buf, ftpState->data.size, ftpRequestBody, ftpState);