mirror of
https://github.com/mirror/wget.git
synced 2025-01-04 01:10:28 +08:00
Fix loop check in FTP code
Reported-by: Coverity scanner
This commit is contained in:
parent
c6ee033425
commit
18fe274e1c
@ -1,3 +1,9 @@
|
|||||||
|
2014-11-19 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
|
* ftp-basic.c (ftp_epsv): Fix loop check
|
||||||
|
|
||||||
|
Reported-by: Coverity scanner
|
||||||
|
|
||||||
2014-11-19 Darshit Shah <darnir@gmail.com>
|
2014-11-19 Darshit Shah <darnir@gmail.com>
|
||||||
|
|
||||||
* exits.c (get_status_for_err): GATEWAYTIMEOUT is a Server Error and Wget's
|
* exits.c (get_status_for_err): GATEWAYTIMEOUT is a Server Error and Wget's
|
||||||
|
@ -784,15 +784,13 @@ ftp_epsv (int csock, ip_address *ip, int *port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Finally, get the port number */
|
/* Finally, get the port number */
|
||||||
tport = 0;
|
for (tport = 0, i = 0; i < 5 && c_isdigit (*s); i++, s++)
|
||||||
for (i = 1; c_isdigit (*s); s++)
|
|
||||||
{
|
|
||||||
if (i > 5)
|
|
||||||
{
|
|
||||||
xfree (respline);
|
|
||||||
return FTPINVPASV;
|
|
||||||
}
|
|
||||||
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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user