dovecot-2.2: lib-storage: mail_get_headers*() returned only the ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 20 15:07:36 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/47923cfd4b56
changeset: 16993:47923cfd4b56
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 20 15:07:26 2013 +0200
description:
lib-storage: mail_get_headers*() returned only the first header from cache.

diffstat:

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

diffs (26 lines):

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);
 		}


More information about the dovecot-cvs mailing list