dovecot/dovecot-2.2.8-47923cfd4b56.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

36 lines
1015 B
Diff

# HG changeset patch
# User Timo Sirainen <tss@iki.fi>
# Date 1384952846 -7200
# Node ID 47923cfd4b5616f943c8e043c09e64e94b5c24f9
# Parent 4ef184875799baa65b4b6048ccde49eefbfd9050
lib-storage: mail_get_headers*() returned only the first header from cache.
diff -r 4ef184875799 -r 47923cfd4b56 src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:50:53 2013 +0200
+++ b/src/lib-storage/index/index-mail-headers.c Wed Nov 20 15:07:26 2013 +0200
@@ -603,7 +603,7 @@
unsigned char *data;
unsigned int field_idx;
string_t *dest;
- size_t i, len;
+ size_t i, len, len2;
int ret;
ARRAY(const char *) header_values;
@@ -657,10 +657,10 @@
while (i < len && IS_LWSP(data[i])) i++;
/* @UNSAFE */
- len = get_header_size(dest, i);
- data[i + len] = '\0';
+ len2 = get_header_size(dest, i);
+ data[i + len2] = '\0';
value = (const char *)data + i;
- i += len + 1;
+ i += len2 + 1;
array_append(&header_values, &value, 1);
}