diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | driver.c | 4 | ||||
-rw-r--r-- | imap.c | 3 | ||||
-rw-r--r-- | pop3.c | 2 |
4 files changed, 6 insertions, 4 deletions
@@ -21,6 +21,7 @@ fetchmail-4.2.9 () existing Received line and *after* any From headers shipped up by the server. This fixes odd problems with some sensitive sendmails. * Compuserve RPA authentication support. +* Fixed a bug that screwed up message size queries on some IMAP2bis servers. There are 285 people on the fetchmail-friends list. @@ -1642,7 +1642,11 @@ const struct method *proto; /* protocol method table */ */ if (proto->getsizes) { + int i; + msgsizes = (int *)alloca(sizeof(int) * count); + for (i = 0; i < count; i++) + msgsizes[i] = -1; ok = (proto->getsizes)(sock, count, msgsizes); if (ok != 0) @@ -463,6 +463,7 @@ static int imap_getsizes(int sock, int count, int *sizes) /* capture the sizes of all messages */ { char buf [POPBUFSIZE+1]; + int i; gen_send(sock, "FETCH 1:%d RFC822.SIZE", count); for (;;) @@ -475,8 +476,6 @@ static int imap_getsizes(int sock, int count, int *sizes) break; else if (sscanf(buf, "* %d FETCH (RFC822.SIZE %d)", &num, &size) == 2) sizes[num - 1] = size; - else - sizes[num - 1] = -1; } return(PS_SUCCESS); @@ -434,8 +434,6 @@ static int pop3_getsizes(int sock, int count, int *sizes) break; else if (sscanf(buf, "%d %d", &num, &size) == 2) sizes[num - 1] = size; - else - sizes[num - 1] = -1; } return(ok); |