aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-03-06 21:48:08 +0000
committerVincent Richard <[email protected]>2013-03-06 21:49:27 +0000
commit4df4ed54dd3f32df3efccf2878f8cad27aae72ca (patch)
tree5387b7e016aa061856a2b0deddf3f61649442078
parentTravis-CI: install dev package for GNU SASL. (diff)
downloadvmime-4df4ed54dd3f32df3efccf2878f8cad27aae72ca.tar.gz
vmime-4df4ed54dd3f32df3efccf2878f8cad27aae72ca.zip
Fixed maximum block size for read().
-rw-r--r--src/utility/streamUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utility/streamUtils.cpp b/src/utility/streamUtils.cpp
index 72916547..06ea17a1 100644
--- a/src/utility/streamUtils.cpp
+++ b/src/utility/streamUtils.cpp
@@ -68,7 +68,7 @@ stream::size_type bufferedStreamCopyRange(inputStream& is, outputStream& os,
while (!is.eof() && total < length)
{
const stream::size_type remaining = std::min(length - total, blockSize);
- const stream::size_type read = is.read(buffer, blockSize);
+ const stream::size_type read = is.read(buffer, remaining);
if (read != 0)
{