slackbuilds_ponce/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff
Matteo Bernardini b32019f871 libraries/libvmime-zarafa: Updated for version 0.9.2_svn603.
Modified library name to libvmime_zarafa,
rewritten name.patch

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
2012-09-26 07:57:54 +02:00

16 lines
515 B
Diff

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