diff options
author | Vincent Richard <[email protected]> | 2011-06-19 17:51:33 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2011-06-19 17:51:33 +0000 |
commit | 49cc5dc40af4beaf89c39e3dea2c15893c84fb56 (patch) | |
tree | 37454561563279858a59a696280854c7e4034735 /src/parameter.cpp | |
parent | Fixed compilation issue following namespace change. (diff) | |
download | vmime-49cc5dc40af4beaf89c39e3dea2c15893c84fb56.tar.gz vmime-49cc5dc40af4beaf89c39e3dea2c15893c84fb56.zip |
Fixed parsing of an attachment filename that is between 66 and 76 characters long (Zarafa).
Diffstat (limited to 'src/parameter.cpp')
-rw-r--r-- | src/parameter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parameter.cpp b/src/parameter.cpp index 91a7e5c4..f59d5abe 100644 --- a/src/parameter.cpp +++ b/src/parameter.cpp @@ -281,7 +281,8 @@ void parameter::generate(utility::outputStream& os, const string::size_type maxL bool needQuoting = false; string::size_type valueLength = 0; - for (string::size_type i = 0 ; (i < value.length()) && (pos + valueLength < maxLineLength - 4) ; ++i, ++valueLength) + // Use worst-case length name.length()+2 for 'name=' part of line + for (string::size_type i = 0 ; (i < value.length()) && (pos + name.length() + 2 + valueLength < maxLineLength - 4) ; ++i, ++valueLength) { switch (value[i]) { |