mod_proxy_ftp: Don't segfault on bad line in FTP listing
PR 40733 [Ulf Harnhammar]
Submitted by: niq
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@574946
13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.2.7
+ *) mod_proxy_ftp: Don't segfault on bad line in FTP listing
+ PR 40733 [Ulf Harnhammar <metaur telia.com>]
+
*) mod_proxy: escape error-notes correctly
PR 40952 [Thijs Kinkhorst <thijs debian.org>]
}
filename = strrchr(ctx->buffer, ' ');
+ if (filename == NULL) {
+ /* Line is broken. Ignore it. */
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
+ "proxy_ftp: could not parse line %s", ctx->buffer);
+ /* erase buffer for next time around */
+ ctx->buffer[0] = 0;
+ continue; /* while state is BODY */
+ }
*(filename++) = '\0';
/* handle filenames with spaces in 'em */