diff options
| author | Vincent Richard <[email protected]> | 2008-07-11 21:46:32 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2008-07-11 21:46:32 +0000 |
| commit | b9c67409576dcff3c5d45aafd20f4554100f647c (patch) | |
| tree | 56d899872d07038bc353615c13dec0ba7966a575 /src/body.cpp | |
| parent | Enable re-generation of broken Content-Id's that had no '@' sign in them (Zar... (diff) | |
| download | vmime-b9c67409576dcff3c5d45aafd20f4554100f647c.tar.gz vmime-b9c67409576dcff3c5d45aafd20f4554100f647c.zip | |
Fixed 'negative unsigned' index causing crash (Zarafa).
Diffstat (limited to 'src/body.cpp')
| -rw-r--r-- | src/body.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/body.cpp b/src/body.cpp index b9180d74..88414ab6 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -141,8 +141,8 @@ void body::parse(const string& buffer, const string::size_type position, string::size_type partEnd = pos; // Get rid of the [CR]LF just before the boundary string - if (pos - 1 >= position && buffer[pos - 1] == '\n') --partEnd; - if (pos - 2 >= position && buffer[pos - 2] == '\r') --partEnd; + if (pos >= (position + 1) && buffer[pos - 1] == '\n') --partEnd; + if (pos >= (position + 2) && buffer[pos - 2] == '\r') --partEnd; // Check whether it is the last part (boundary terminated by "--") pos += boundarySep.length(); |
