aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pop3.c b/pop3.c
index 0cf58da7..b1f9621c 100644
--- a/pop3.c
+++ b/pop3.c
@@ -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);
/*