summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ziplink.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp
index ebff5ebf0..06ad20d35 100644
--- a/src/modules/extra/m_ziplink.cpp
+++ b/src/modules/extra/m_ziplink.cpp
@@ -347,7 +347,8 @@ class ModuleZLib : public Module
ServerInstance->Log(DEBUG,"Decompressed %d bytes, total_decomp=%d: '%s'", session->d_stream.total_out, total_decomp, buffer);
- size = session->inbuf->GetFrame(compr, CHUNK);
+ if (total_decomp < count)
+ size = session->inbuf->GetFrame(compr, CHUNK);
}
buffer[total_decomp] = 0;