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:
des 2001-04-07 15:26:31 +00:00
parent 9a3c0b7476
commit 0e80555162

View File

@ -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)