httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1551714 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
Date Tue, 17 Dec 2013 21:18:04 GMT
Author: jailletc36
Date: Tue Dec 17 21:18:04 2013
New Revision: 1551714

URL: http://svn.apache.org/r1551714
Log:
Avoid sending back uninitialized memory, use 'ftpmessage' in order to have something meaningful
instead.

Save 8k of stack by the same time.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c?rev=1551714&r1=1551713&r2=1551714&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c Tue Dec 17 21:18:04 2013
@@ -983,7 +983,6 @@ static int proxy_ftp_handler(request_rec
     apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
     char *buf, *connectname;
     apr_port_t connectport;
-    char buffer[MAX_STRING_LEN];
     char *ftpmessage = NULL;
     char *path, *strp, *type_suffix, *cwd = NULL;
     apr_uri_t uri;
@@ -1673,7 +1672,7 @@ static int proxy_ftp_handler(request_rec
                         "Error reading from remote server");
             }
             else if (rc != 200) {
-                return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, buffer);
+                return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, ftpmessage);
             }
 
             /* signal that we must use the EPRT/PORT loop */



Mime
View raw message