Mercurial > dovecot > core-2.2
changeset 14603:49607e4a97d4
message header parser: Don't skip header if header name is longer than input buffer.
We'll instead now just return the name in smaller blocks with
no_newline=TRUE. This allows the caller to reconstruct the exact same
message.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Jun 2012 01:45:55 +0300 |
parents | 8a4e5e5d82b5 |
children | 217fe26a3176 |
files | src/lib-mail/message-header-parser.c |
diffstat | 1 files changed, 0 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-mail/message-header-parser.c Wed Jun 20 01:40:14 2012 +0300 +++ b/src/lib-mail/message-header-parser.c Wed Jun 20 01:45:55 2012 +0300 @@ -134,22 +134,6 @@ /* a) line is larger than input buffer b) header ended unexpectedly */ - if (colon_pos == UINT_MAX && ret == -2 && !continued) { - /* header name is huge. just skip it. */ - i_assert(size > 1); - if (msg[size-1] == '\r') - size--; - - if (ctx->hdr_size != NULL) { - ctx->hdr_size->physical_size += size; - ctx->hdr_size->virtual_size += size; - } - i_stream_skip(ctx->input, size); - ctx->skip_line = TRUE; - startpos = 0; - continue; - } - if (ret == -2) { /* go back to last LWSP if found. */ size_t min_pos = !continued ? colon_pos : 0;