You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2011/12/12 22:56:45 UTC
svn commit: r1213458 - in /httpd/mod_ftp/trunk: CHANGES-FTP
modules/ftp/ftp_commands.c
Author: wrowe
Date: Mon Dec 12 21:56:45 2011
New Revision: 1213458
URL: http://svn.apache.org/viewvc?rev=1213458&view=rev
Log:
Resolve a crash-bug in RETR/REST when the client would terminate
the retrieval in interesting ways. Ensure we linger close prior
to reverting the filter stack.
Many thanks to Mikhail T for crash dump results and testing of
this fix.
Modified:
httpd/mod_ftp/trunk/CHANGES-FTP
httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
Modified: httpd/mod_ftp/trunk/CHANGES-FTP
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/CHANGES-FTP?rev=1213458&r1=1213457&r2=1213458&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/CHANGES-FTP (original)
+++ httpd/mod_ftp/trunk/CHANGES-FTP Mon Dec 12 21:56:45 2011
@@ -1,6 +1,8 @@
Changes in 1.0.1:
-
+ *) Resolve a crash-bug in RETR/REST when the client would terminate
+ the retrieval in interesting ways. Ensure we linger close prior
+ to reverting the filter stack. [William Rowe]
Changes in 1.0.0:
Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c?rev=1213458&r1=1213457&r2=1213458&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Mon Dec 12 21:56:45 2011
@@ -2171,6 +2171,11 @@ static int ftp_cmd_retr(request_rec *r,
}
clean_up:
+ /* Close the data connection, send confirmation, and return */
+ ap_lingering_close(cdata);
+ fc->datasock = NULL;
+ fc->filter_mask = 0;
+
ap_destroy_sub_req(rr);
/* Replace the filters and connection */
@@ -2180,11 +2185,6 @@ clean_up:
r->proto_output_filters = routput_proto;
r->connection = c;
- /* Close the data connection, send confirmation, and return */
- ap_lingering_close(cdata);
- fc->datasock = NULL;
- fc->filter_mask = 0;
-
return res;
}