From 0e8055516291636a4ae347bbf09bd3fdb2eb5d50 Mon Sep 17 00:00:00 2001 From: des Date: Sat, 7 Apr 2001 15:26:31 +0000 Subject: [PATCH] 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(+) diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index b866e78dc332..a2dfc93d1bb2 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)