From 0c079e4522ea600fbc6079fd27524db1c1c22ac4 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 25 Jan 2011 00:24:33 +0100 Subject: cherry-picked fixes for package vmime --- src/vmime-1-fixes.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/src/vmime-1-fixes.patch b/src/vmime-1-fixes.patch index 4cdd96c..5aefa69 100644 --- a/src/vmime-1-fixes.patch +++ b/src/vmime-1-fixes.patch @@ -44,7 +44,7 @@ GITDIR=~/projects/vmime/git/vmime From c6f077e695b75d9ff9a32d1621f6a320c8ce70f1 Mon Sep 17 00:00:00 2001 From: vincent-richard Date: Tue, 30 Nov 2010 14:57:03 +0000 -Subject: [PATCH 1/4] Initialize and delete object. +Subject: [PATCH 1/5] Initialize and delete object. git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@577 5301114d-f842-0410-bbdd-996ee0417009 @@ -78,7 +78,7 @@ index 0f3e9ec..d71c3ca 100644 From 41203315eacf53230dd7bdb0cf2b0d1078ddee39 Mon Sep 17 00:00:00 2001 From: vincent-richard Date: Wed, 8 Dec 2010 08:52:54 +0000 -Subject: [PATCH 2/4] No extra space between ':' and '<' in MAIL FROM and RCPT TO. Wait for server response after QUIT and before closing connection. +Subject: [PATCH 2/5] No extra space between ':' and '<' in MAIL FROM and RCPT TO. Wait for server response after QUIT and before closing connection. git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@579 5301114d-f842-0410-bbdd-996ee0417009 @@ -119,7 +119,7 @@ index 204daae..d9fb7b8 100644 From 969b56f4bd61ddb8277c04ac2a1e35e029ec058b Mon Sep 17 00:00:00 2001 From: vincent-richard Date: Fri, 10 Dec 2010 16:24:06 +0000 -Subject: [PATCH 3/4] Fixed unit test after bug fix. +Subject: [PATCH 3/5] Fixed unit test after bug fix. git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@580 5301114d-f842-0410-bbdd-996ee0417009 @@ -143,7 +143,7 @@ index 5015552..6552f9e 100644 From 50743da0712b216533acdc09069f1bfc81f988c6 Mon Sep 17 00:00:00 2001 From: vincent-richard Date: Fri, 10 Dec 2010 16:54:38 +0000 -Subject: [PATCH 4/4] Fixed boundary parsing (thanks to John van der Kamp, Zarafa). +Subject: [PATCH 4/5] Fixed boundary parsing (thanks to John van der Kamp, Zarafa). git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@581 5301114d-f842-0410-bbdd-996ee0417009 @@ -227,3 +227,55 @@ index 12c4f74..df2bf85 100644 -- 1.7.1 + +From b6d2b4765c9472ff333cace13c57c6af0e866ee0 Mon Sep 17 00:00:00 2001 +From: vincent-richard +Date: Fri, 21 Jan 2011 15:28:06 +0000 +Subject: [PATCH 5/5] Fixed possible infinite loop (thanks to John van der Kamp, Zarafa). + +git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@582 5301114d-f842-0410-bbdd-996ee0417009 + +diff --git a/src/word.cpp b/src/word.cpp +index db720dc..1c1c1a6 100644 +--- a/src/word.cpp ++++ b/src/word.cpp +@@ -386,7 +386,7 @@ void word::generate(utility::outputStream& os, const string::size_type maxLineLe + + maxRunLength = std::max(maxRunLength, curRunLength); + +- if (maxRunLength >= maxLineLength - 3) ++ if (((flags & text::FORCE_NO_ENCODING) == 0) && maxRunLength >= maxLineLength - 3) + { + // Generate with encoding forced + generate(os, maxLineLength, curLinePos, newLinePos, flags | text::FORCE_ENCODING, state); +diff --git a/tests/parser/textTest.cpp b/tests/parser/textTest.cpp +index b84f376..746ac94 100644 +--- a/tests/parser/textTest.cpp ++++ b/tests/parser/textTest.cpp +@@ -52,6 +52,7 @@ VMIME_TEST_SUITE_BEGIN + VMIME_TEST(testWhitespaceMBox) + + VMIME_TEST(testFoldingAscii) ++ VMIME_TEST(testForcedNonEncoding) + VMIME_TEST_LIST_END + + +@@ -442,5 +443,15 @@ VMIME_TEST_SUITE_BEGIN + " =?us-ascii?Q?9012345678901234567890123456789?=", w.generate(50)); + } + ++ void testForcedNonEncoding() ++ { ++ // Testing long unbreakable and unencodable header ++ vmime::relay r; ++ r.parse(" from User (Ee9GMqZQ8t7IQwftfAFHd2KyScCYRrFSJ50tKEoXv2bVCG4HcPU80GGWiFabAvG77FekpGgF1h@[127.0.0.1]) by servername.hostname.com\n\t" ++ "with esmtp id 1NGTS9-2C0sqG0; Fri, 4 Dec 2009 09:23:49 +0100"); ++ ++ VASSERT_EQ("received.long", "from User\r\n (Ee9GMqZQ8t7IQwftfAFHd2KyScCYRrFSJ50tKEoXv2bVCG4HcPU80GGWiFabAvG77FekpGgF1h@[127.0.0.1])\r\n by servername.hostname.com with esmtp id 1NGTS9-2C0sqG0; Fri, 4 Dec 2009\r\n 09:23:49 +0100", r.generate(78)); ++ } ++ + VMIME_TEST_SUITE_END + +-- +1.7.1 + -- cgit v0.12