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
7370c6a68a
commit
525be862e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75292
@ -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