If the server's reply to the SIZE command is unparseable, reset us->size
to -1 so the caller will know it's invalid. This is an MFC candidate.
This commit is contained in:
parent
9a3c0b7476
commit
0e80555162
@ -259,6 +259,7 @@ _ftp_stat(int cd, char *file, struct url_stat *us)
|
||||
us->size = us->size * 10 + *ln - '0';
|
||||
if (*ln && !isspace(*ln)) {
|
||||
_ftp_seterr(FTP_PROTOCOL_ERROR);
|
||||
us->size = -1;
|
||||
return -1;
|
||||
}
|
||||
if (us->size == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user