diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-04-24 04:05:16 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-04-24 06:14:31 +0200 |
commit | db1d72d825c1eab2419befb797acfaf0a36a277b (patch) | |
tree | 79a99de395be95856358aab6f9623919e4427117 /pop3.c | |
parent | 77f6d4c3bcb260881caeefb04eb2f3c2f2370052 (diff) | |
download | fetchmail-db1d72d825c1eab2419befb797acfaf0a36a277b.tar.gz fetchmail-db1d72d825c1eab2419befb797acfaf0a36a277b.tar.bz2 fetchmail-db1d72d825c1eab2419befb797acfaf0a36a277b.zip |
Validate STAT response more strictly.
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1009,9 +1009,13 @@ static int pop3_getrange(int sock, /* get the total message count */ gen_send(sock, "STAT"); ok = pop3_ok(sock, buf); - if (ok == 0) - sscanf(buf,"%d %d", countp, bytes); - else + if (ok == 0) { + int asgn; + + asgn = sscanf(buf,"%d %d", countp, bytes); + if (asgn != 2) + return PS_PROTOCOL; + } else return(ok); /* |