aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/compress_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/compression/compress_utils.cpp')
-rw-r--r--src/lib/compression/compress_utils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/compression/compress_utils.cpp b/src/lib/compression/compress_utils.cpp
index ceb180c4b..6edc22292 100644
--- a/src/lib/compression/compress_utils.cpp
+++ b/src/lib/compression/compress_utils.cpp
@@ -68,6 +68,12 @@ void Stream_Compression::process(secure_vector<uint8_t>& buf, size_t offset, uin
BOTAN_ASSERT(m_stream, "Initialized");
BOTAN_ASSERT(buf.size() >= offset, "Offset is sane");
+ // bzip doesn't like being called with no input and BZ_RUN
+ if(buf.size() == offset && flags == m_stream->run_flag())
+ {
+ return;
+ }
+
if(m_buffer.size() < buf.size() + offset)
m_buffer.resize(buf.size() + offset);