dovecot/dovecot-2.2.8-f4eb4b5884b2.patch
Michal Hlavinka 680863f7be Fixed infinite loop in message parsing if message ends with
"--boundary" and CR (without LF). Messages saved via SMTP/LMTP can't
  trigger this, because messages must end with an "LF.". A user could
  trigger this for him/herself though.
- lmtp: Client was sometimes disconnected before all the output was
  sent to it.
- replicator: Database wasn't being exported to disk every 15 minutes
  as it should have. Instead it was being imported, causing "doveadm
  replicator remove" commands to not work very well.
2013-11-20 17:12:58 +01:00

23 lines
878 B
Diff

# HG changeset patch
# User Timo Sirainen <tss@iki.fi>
# Date 1384951064 -7200
# Node ID f4eb4b5884b2e89e146a32b2d1db1f14f753008f
# Parent 4a0c03f98ca350634430e5c3bd5f8e5efc030a45
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 -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);