summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-11-22 14:50:46 +0000
committerdes <des@FreeBSD.org>2000-11-22 14:50:46 +0000
commit24bc75d6d1e5df301ac3b383133ebeaf79603108 (patch)
tree13808bf684a28915669d43d008abf99a2df48b4f /lib/libfetch/ftp.c
parentc3ebcca666aed29fc5b2beb2970f447ff8777c52 (diff)
downloadFreeBSD-src-24bc75d6d1e5df301ac3b383133ebeaf79603108.zip
FreeBSD-src-24bc75d6d1e5df301ac3b383133ebeaf79603108.tar.gz
Don't go haywire if the server closes the connection in the middle of a
multiline response (proper fix this time).
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 3e56342..ab2c54d 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -139,7 +139,7 @@ _ftp_chkerr(int cd)
return -1;
}
if (isftpinfo(last_reply)) {
- while (!isftpreply(last_reply)) {
+ while (lr_length && !isftpreply(last_reply)) {
if (_fetch_getln(cd, &last_reply, &lr_size, &lr_length) == -1) {
_fetch_syserr();
return -1;
OpenPOWER on IntegriCloud