dovecot-2.2: message header parser: Don't skip header if header ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jun 20 02:20:36 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/49607e4a97d4
changeset: 14603:49607e4a97d4
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 20 01:45:55 2012 +0300
description:
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.
diffstat:
src/lib-mail/message-header-parser.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diffs (26 lines):
diff -r 8a4e5e5d82b5 -r 49607e4a97d4 src/lib-mail/message-header-parser.c
--- 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;
More information about the dovecot-cvs
mailing list