blob: eca769946b63d5b1d225a42ce3f400b950933649 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp
--- libvmime-0.9.2.orig/src/headerField.cpp 2010-05-20 05:33:45.000000000 -0700
+++ libvmime-0.9.2.patched/src/headerField.cpp 2011-08-29 12:10:08.438497914 -0700
@@ -157,14 +157,12 @@
{
contentsEnd = pos;
pos += 2;
- break;
}
else if (c == '\n')
{
contentsEnd = pos;
++pos;
- break;
- }
+ } else {
while (pos < end)
{
@@ -186,24 +184,13 @@
++pos;
}
+ }
// Handle the case of folded lines
if (buffer[pos] == ' ' || buffer[pos] == '\t')
{
// This is a folding white-space: we keep it as is and
// we continue with contents parsing...
-
- // If the line contains only space characters, we assume it is
- // the end of the headers. This is not strictly standard-compliant
- // but, hey, we can't fail when parsing some malformed mails...
- while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t'))
- ++pos;
-
- if ((pos < end && buffer[pos] == '\n') ||
- (pos + 1 < end && buffer[pos] == '\r' && buffer[pos + 1] == '\n'))
- {
- break;
- }
}
else
{
|