From: Timo Sirainen Date: Wed, 16 Jun 2004 05:36:59 +0000 (+0300) Subject: Handle missing last \n from headers more correctly X-Git-Tag: 1.1.alpha1~3961 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cadcc24bb0e8263fa90c046f6ee98c47ef1c288f;p=thirdparty%2Fdovecot%2Fcore.git Handle missing last \n from headers more correctly --HG-- branch : HEAD --- diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c index 9ea0d1273b..1e249a13c3 100644 --- a/src/lib-mail/message-parser.c +++ b/src/lib-mail/message-parser.c @@ -754,16 +754,18 @@ message_parse_header_next(struct message_header_parser_ctx *ctx) continue; } - /* go back to last LWSP if found. */ - for (i = size-1; i > colon_pos; i--) { - if (IS_LWSP(msg[i])) { - size = i; - break; + if (ret == -2) { + /* go back to last LWSP if found. */ + for (i = size-1; i > colon_pos; i--) { + if (IS_LWSP(msg[i])) { + size = i; + break; + } } - } + line->continues = TRUE; + } line->no_newline = TRUE; - line->continues = TRUE; ctx->skip = size; break; }