diff options
| author | Vincent Richard <[email protected]> | 2011-06-25 17:07:53 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2011-06-25 17:07:53 +0000 |
| commit | a55c574436973c354d731fffa81afabac98c1cfd (patch) | |
| tree | 5f75eb67f009dc34b88a71f8701c5b26b836f0b9 /src/body.cpp | |
| parent | Added missing libs in pkg-config file. (diff) | |
| download | vmime-a55c574436973c354d731fffa81afabac98c1cfd.tar.gz vmime-a55c574436973c354d731fffa81afabac98c1cfd.zip | |
Fixed parsing of empty body parts (thanks to John van der Kamp, from Zarafa).
Diffstat (limited to 'src/body.cpp')
| -rw-r--r-- | src/body.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/body.cpp b/src/body.cpp index 85968330..9d7d57f9 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -197,6 +197,11 @@ void body::parse(const string& buffer, const string::size_type position, { ref <bodyPart> part = vmime::create <bodyPart>(); + // End before start may happen on empty bodyparts (directly + // successive boundaries without even a line-break) + if (partEnd < partStart) + std::swap(partStart, partEnd); + part->parse(buffer, partStart, partEnd, NULL); part->m_parent = m_part; |
