1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

src/ftp-basic.c: Accept 5-digit port numbers in EPSV responses

Reported-by: Adam Sampson <ats@offog.org>
This commit is contained in:
Tim Ruehsen 2015-01-04 20:50:11 +01:00
parent 01d5177f7a
commit 5e3a760731

View File

@ -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++) for (tport = 0, i = 0; i < 5 && c_isdigit (*s); i++, s++)
tport = (*s - '0') + 10 * tport; tport = (*s - '0') + 10 * tport;
if (i >= 5)
{
xfree (respline);
return FTPINVPASV;
}
/* Make sure that the response terminates correcty */ /* Make sure that the response terminates correcty */
if (*s++ != delim) if (*s++ != delim)
{ {