From: Timo Sirainen Date: Wed, 20 Nov 2013 12:37:44 +0000 (+0200) Subject: lib-storage: mail_get_*header*() didn't remove leading whitespace for headers from... X-Git-Tag: 2.2.9~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2188b937671a76bb79df1526884fe3601f13a42f;p=thirdparty%2Fdovecot%2Fcore.git 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. --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 8be30b792b..6b075b30f7 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -653,7 +653,8 @@ index_mail_get_raw_headers(struct index_mail *mail, const char *field, /* 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);