diff options
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index e50f4234fd3..6c578c74f8f 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -82,6 +82,7 @@ inlineResize(Buffer* buffer, int total) { throw MemoryLimitException(__FILE__, __LINE__); } + buffer->b.reserve(max(static_cast<size_t>(total), 2 * buffer->b.capacity())); buffer->b.resize(total); } |