aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver.c b/driver.c
index 6176bcb9..74e1b28a 100644
--- a/driver.c
+++ b/driver.c
@@ -542,8 +542,9 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
lastnum = num + fetchsizelimit - 1;
if (lastnum > count)
lastnum = count;
- for (i = 0; i < fetchsizelimit; i++)
- (*msgsizes)[i] = 0;
+ if (*msgsizes)
+ for (i = 0; i < fetchsizelimit; i++)
+ (*msgsizes)[i] = 0;
stage = STAGE_GETSIZES;
err = (ctl->server.base_protocol->getpartialsizes)(mailserver_socket, num, lastnum, *msgsizes);