From 4df4ed54dd3f32df3efccf2878f8cad27aae72ca Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 6 Mar 2013 22:48:08 +0100 Subject: [PATCH] Fixed maximum block size for read(). --- src/utility/streamUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {