wget/wget-1.16.1-5-digit-port-ftp-epsv-ipv6.patch

32 lines
808 B
Diff
Raw Normal View History

From 5e3a76073157510b1040578e70cb1234759a730f Mon Sep 17 00:00:00 2001
From: Tim Ruehsen <tim.ruehsen@gmx.de>
Date: Sun, 4 Jan 2015 20:50:11 +0100
Subject: [PATCH] src/ftp-basic.c: Accept 5-digit port numbers in EPSV
responses
Reported-by: Adam Sampson <ats@offog.org>
---
src/ftp-basic.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/ftp-basic.c b/src/ftp-basic.c
index f9b9ad2..fdd6114 100644
--- a/src/ftp-basic.c
+++ b/src/ftp-basic.c
@@ -788,12 +788,6 @@ ftp_epsv (int csock, ip_address *ip, int *port)
for (tport = 0, i = 0; i < 5 && c_isdigit (*s); i++, s++)
tport = (*s - '0') + 10 * tport;
- if (i >= 5)
- {
- xfree (respline);
- return FTPINVPASV;
- }
-
/* Make sure that the response terminates correcty */
if (*s++ != delim)
{
--
2.1.0