From d3e6807f615d1c2b7740f1e1f53cd28cc18657dc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 8 Nov 2019 17:50:32 +0100 Subject: [PATCH] - fixed infinite loop in compression code. --- source/common/utility/files_decompress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/utility/files_decompress.cpp b/source/common/utility/files_decompress.cpp index 3f89c8a4f..c6707a283 100644 --- a/source/common/utility/files_decompress.cpp +++ b/source/common/utility/files_decompress.cpp @@ -732,7 +732,7 @@ size_t CompressedFileWriter::Write(const void *buffer, size_t bytes) size_t towrite = bytes; zipstream->next_in = (Bytef *)buffer; - while (bytes > 0) + while (towrite > 0) { auto chunk = std::min(towrite, (size_t)0x40000000); zipstream->avail_in = chunk;