diff options
author | Vincent Richard <[email protected]> | 2011-01-21 15:28:06 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2011-01-21 15:28:06 +0000 |
commit | 3cec9612fa84db2ff8e8246ba4b9353716817a90 (patch) | |
tree | df72ec7f3a7354e57e4565262e5462702ba29698 /tests/parser/textTest.cpp | |
parent | Fixed boundary parsing (thanks to John van der Kamp, Zarafa). (diff) | |
download | vmime-3cec9612fa84db2ff8e8246ba4b9353716817a90.tar.gz vmime-3cec9612fa84db2ff8e8246ba4b9353716817a90.zip |
Fixed possible infinite loop (thanks to John van der Kamp, Zarafa).
Diffstat (limited to 'tests/parser/textTest.cpp')
-rw-r--r-- | tests/parser/textTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/parser/textTest.cpp b/tests/parser/textTest.cpp index b84f376c..746ac948 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 |