From: Matthias A. <mat...@gm...> - 2005-11-14 23:42:27
|
Sunil Shetye schrieb am 2005-11-11: > Changes in imap_trail() in r4396 are incorrect and can cause segfault. How can it cause segfault? It may eat too much garbage but I'd really like to see the backtrace to investigate - if a malicious upstream server can also trigger the segfault, we're in trouble. > This patch should fix this. Applied, thank you. > > =============================================================================== > Index: fetchmail/imap.c > =================================================================== > --- fetchmail/imap.c (revision 4410) > +++ fetchmail/imap.c (working copy) > @@ -1055,8 +1055,9 @@ > > /* UW IMAP returns "OK FETCH", Cyrus returns "OK Completed" */ > if (strncmp(buf, tag, strlen(tag)) == 0) { > - t = buf + strspn(t, " \t"); > - if (strncmp(t, "OK", 2)) > + t = buf + strlen(tag); > + t += strspn(t, " \t"); > + if (strncmp(t, "OK", 2) == 0) > break; > } > } > =============================================================================== > -- Matthias Andree |