aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-06-11 06:17:34 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-06-11 06:17:34 +0000
commit607bee31060fd9ff4edc6b9e1997bb5c905ae6fc (patch)
treed72f82a215c592ca53ed0f3e8bd740869780b37e
parentf5435f0913b92f209336fe99c39c200a57392cf7 (diff)
downloadfetchmail-607bee31060fd9ff4edc6b9e1997bb5c905ae6fc.tar.gz
fetchmail-607bee31060fd9ff4edc6b9e1997bb5c905ae6fc.tar.bz2
fetchmail-607bee31060fd9ff4edc6b9e1997bb5c905ae6fc.zip
Prevent false positives during body fetches.
svn path=/trunk/; revision=2489
-rw-r--r--imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap.c b/imap.c
index 94e4da30..c6e3cc8b 100644
--- a/imap.c
+++ b/imap.c
@@ -1061,7 +1061,7 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
if ((ok = gen_recv(sock, buf, sizeof(buf))))
return(ok);
} while
- (sscanf(buf+2, "%d FETCH", &num) != 1);
+ (!strstr(buf+4, "FETCH") || sscanf(buf+2, "%d", &num) != 1);
if (num != number)
return(PS_ERROR);