summaryrefslogtreecommitdiff
path: root/libraries/libvmime-zarafa/zarafa-patches/vmime-missing-boundary.diff
blob: 724a68427f67c93ceb3d661e8df8699230404d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff -Nurb libvmime-0.7.1.orig/src/body.cpp libvmime-0.7.1/src/body.cpp
--- libvmime-0.7.1.orig/src/body.cpp	2005-03-18 22:26:46.000000000 +0100
+++ libvmime-0.7.1/src/body.cpp	2006-01-12 15:45:48.443911888 +0100
@@ -200,6 +200,27 @@
 
 		if (partStart < end)
 			m_epilogText = string(buffer.begin() + partStart, buffer.begin() + end);
+
+		// lastPart was not found, so the last boundary was missing
+		// m_epilogText will become a bodyPart
+		if (!lastPart && pos == string::npos) {
+			bodyPart* part = new bodyPart;
+
+			try
+			{
+				part->parse(m_epilogText);
+			}
+			catch (std::exception&)
+			{
+				delete (part);
+				throw;
+			}
+
+			part->m_parent = m_part;
+
+			m_parts.push_back(part);
+		}
+			
 	}
 	// Treat the contents as 'simple' data
 	else