dovecot-2.2: lib-storage: mail_get_*header*() didn't remove lead...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 20 14:39:15 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/f4eb4b5884b2
changeset: 16990:f4eb4b5884b2
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 20 14:37:44 2013 +0200
description:
lib-storage: mail_get_*header*() didn't remove leading whitespace for headers from cache.
But it was removed when the headers were found by parsing the full header.

diffstat:

 src/lib-storage/index/index-mail-headers.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 4a0c03f98ca3 -r f4eb4b5884b2 src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c	Tue Nov 19 23:18:11 2013 +0200
+++ b/src/lib-storage/index/index-mail-headers.c	Wed Nov 20 14:37:44 2013 +0200
@@ -653,7 +653,8 @@
 	/* cached. skip "header name: " parts in dest. */
 	for (i = 0; i < len; i++) {
 		if (data[i] == ':') {
-			if (i+1 != len && data[++i] == ' ') i++;
+			while (IS_LWSP(data[i+1])) i++;
+			if (i+1 != len) i++;
 
 			/* @UNSAFE */
 			len = get_header_size(dest, i);


More information about the dovecot-cvs mailing list