From a14b691e19c0cf1fa72557fdb74ec97158b014d1 Mon Sep 17 00:00:00 2001 From: des Date: Sat, 7 Apr 2001 15:26:31 +0000 Subject: 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. --- lib/libfetch/ftp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libfetch/ftp.c') diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index b866e78..a2dfc93 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -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) -- cgit v1.1