aboutsummaryrefslogtreecommitdiff
path: root/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff')
-rw-r--r--libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff16
1 files changed, 16 insertions, 0 deletions
diff --git a/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff b/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff
new file mode 100644
index 000000000000..7634edd1bc81
--- /dev/null
+++ b/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff
@@ -0,0 +1,16 @@
+--- svn/src/wordEncoder.cpp (revision 603)
++++ svn/src/wordEncoder.cpp (working copy)
+@@ -239,6 +239,13 @@
+ if (buffer.find_first_of("\n\r") != string::npos)
+ return true;
+
++ // If the string contains a QP string, we need to encode this.
++ // Not a 100% check, but we'd only get more encoded strings.
++ std::string::size_type pos = buffer.find("=?");
++ std::string::size_type end = buffer.find("?=");
++ if (pos != string::npos && end != string::npos && end > pos)
++ return true;
++
+ return false;
+ }
+