httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r581429 - /httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
Date Tue, 02 Oct 2007 23:05:06 GMT
Author: wrowe
Date: Tue Oct  2 16:05:06 2007
New Revision: 581429

URL: http://svn.apache.org/viewvc?rev=581429&view=rev
Log:
sscanf ensures we really wasted our time dup'ing arg.

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c

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=581429&r1=581428&r2=581429&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Tue Oct  2 16:05:06 2007
@@ -1613,7 +1613,7 @@
     apr_sockaddr_t *sa;
     apr_socket_t *s;
     apr_status_t rv;
-    char *request, *ip_addr;
+    char *ip_addr;
     short port;
 #if !defined(WIN32) && !defined(HPUX)
     uid_t user = 0;
@@ -1626,8 +1626,7 @@
         fc->passive_created = -1;
     }
 
-    request = apr_pstrdup(r->pool, arg);
-    if ((res = sscanf(request, "%d,%d,%d,%d,%d,%d", &val[0], &val[1], &val[2],
+    if ((res = sscanf(arg, "%d,%d,%d,%d,%d,%d", &val[0], &val[1], &val[2],
                       &val[3], &val[4], &val[5])) != 6) {
         fc->response_notes = apr_pstrdup(r->pool, "Invalid PORT request");
         return FTP_REPLY_SYNTAX_ERROR;   



Mime
View raw message