1 |
eras 13/11/21 16:07:40 |
2 |
|
3 |
Added: dovecot-2.2.8-sieve.patch |
4 |
dovecot-2.2.8-mail-headers.patch |
5 |
Log: |
6 |
Version bump - bug #491832 |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 net-mail/dovecot/files/dovecot-2.2.8-sieve.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/files/dovecot-2.2.8-sieve.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/files/dovecot-2.2.8-sieve.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: dovecot-2.2.8-sieve.patch |
17 |
=================================================================== |
18 |
diff -r d3cf06639864 -r f4eb4b5884b2 src/lib-storage/index/index-mail-headers.c |
19 |
--- a/src/lib-storage/index/index-mail-headers.c Sun Feb 24 09:16:31 2013 +0200 |
20 |
+++ b/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:37:44 2013 +0200 |
21 |
@@ -653,7 +653,8 @@ |
22 |
/* cached. skip "header name: " parts in dest. */ |
23 |
for (i = 0; i < len; i++) { |
24 |
if (data[i] == ':') { |
25 |
- if (i+1 != len && data[++i] == ' ') i++; |
26 |
+ while (IS_LWSP(data[i+1])) i++; |
27 |
+ if (i+1 != len) i++; |
28 |
|
29 |
/* @UNSAFE */ |
30 |
len = get_header_size(dest, i); |
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
diff -r f4eb4b5884b2 -r a91437fe94b6 src/lib-storage/index/index-mail-headers.c |
37 |
--- a/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:37:44 2013 +0200 |
38 |
+++ b/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:38:55 2013 +0200 |
39 |
@@ -760,6 +760,9 @@ |
40 |
mail_cache_set_corrupted(_mail->box->cache, |
41 |
"Broken header %s for mail UID %u", |
42 |
field, _mail->uid); |
43 |
+ /* retry by parsing the full header */ |
44 |
+ } else { |
45 |
+ break; |
46 |
} |
47 |
} |
48 |
return ret; |
49 |
@@ -788,6 +791,9 @@ |
50 |
mail_cache_set_corrupted(_mail->box->cache, |
51 |
"Broken header %s for mail UID %u", |
52 |
field, _mail->uid); |
53 |
+ /* retry by parsing the full header */ |
54 |
+ } else { |
55 |
+ break; |
56 |
} |
57 |
} |
58 |
*value_r = list[0]; |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
1.1 net-mail/dovecot/files/dovecot-2.2.8-mail-headers.patch |
68 |
|
69 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/files/dovecot-2.2.8-mail-headers.patch?rev=1.1&view=markup |
70 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/files/dovecot-2.2.8-mail-headers.patch?rev=1.1&content-type=text/plain |
71 |
|
72 |
Index: dovecot-2.2.8-mail-headers.patch |
73 |
=================================================================== |
74 |
diff -r a91437fe94b6 -r 4ef184875799 src/lib-storage/index/index-mail-headers.c |
75 |
--- a/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:38:55 2013 +0200 |
76 |
+++ b/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:50:53 2013 +0200 |
77 |
@@ -653,8 +653,8 @@ |
78 |
/* cached. skip "header name: " parts in dest. */ |
79 |
for (i = 0; i < len; i++) { |
80 |
if (data[i] == ':') { |
81 |
- while (IS_LWSP(data[i+1])) i++; |
82 |
- if (i+1 != len) i++; |
83 |
+ i++; |
84 |
+ while (i < len && IS_LWSP(data[i])) i++; |
85 |
|
86 |
/* @UNSAFE */ |
87 |
len = get_header_size(dest, i); |
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
diff -r 4ef184875799 -r 47923cfd4b56 src/lib-storage/index/index-mail-headers.c |
94 |
--- a/src/lib-storage/index/index-mail-headers.c Wed Nov 20 14:50:53 2013 +0200 |
95 |
+++ b/src/lib-storage/index/index-mail-headers.c Wed Nov 20 15:07:26 2013 +0200 |
96 |
@@ -603,7 +603,7 @@ |
97 |
unsigned char *data; |
98 |
unsigned int field_idx; |
99 |
string_t *dest; |
100 |
- size_t i, len; |
101 |
+ size_t i, len, len2; |
102 |
int ret; |
103 |
ARRAY(const char *) header_values; |
104 |
|
105 |
@@ -657,10 +657,10 @@ |
106 |
while (i < len && IS_LWSP(data[i])) i++; |
107 |
|
108 |
/* @UNSAFE */ |
109 |
- len = get_header_size(dest, i); |
110 |
- data[i + len] = '\0'; |
111 |
+ len2 = get_header_size(dest, i); |
112 |
+ data[i + len2] = '\0'; |
113 |
value = (const char *)data + i; |
114 |
- i += len + 1; |
115 |
+ i += len2 + 1; |
116 |
|
117 |
array_append(&header_values, &value, 1); |
118 |
} |