Fixed a serious problem with IMAP header fetch. memreadline() returns a pointer...
authorArt Cancro <ajc@citadel.org>
Thu, 20 Nov 2008 21:09:55 +0000 (21:09 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 20 Nov 2008 21:09:55 +0000 (21:09 +0000)
commit64c5deb3abadc256b390413fe34a1cd9d5b4046d
tree0c992853f8fb687a1e6b6fc08cffcb159e0a6c59
parent0d3e9dd6c1fdaf2ada4e76fe7491304d7877c0b3
Fixed a serious problem with IMAP header fetch.  memreadline() returns a pointer to the *next* line, or null if we're at the end.  In the IMAP header parsing routine we were checking for null at the top of a while loop, where we should have been checking for null at the end of a do-while loop.  As a result, the last header line was being discarded under any circumstances.
citadel/modules/imap/imap_fetch.c