summaryrefslogtreecommitdiffstats
path: root/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff')
-rw-r--r--libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff45
1 files changed, 45 insertions, 0 deletions
diff --git a/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff b/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff
new file mode 100644
index 0000000000..eca769946b
--- /dev/null
+++ b/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff
@@ -0,0 +1,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
+ {