From 77ceb97f960b936ece62c3291da14c4d2f9635df Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 7 Mar 2017 09:01:03 -0800 Subject: [PATCH] UI/updater: Fixed a bug with deflating The file could deflate infinitely until hard drive space ran out. --- UI/win-update/updater/http.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UI/win-update/updater/http.cpp b/UI/win-update/updater/http.cpp index cbea2b3cd..dff46c168 100644 --- a/UI/win-update/updater/http.cpp +++ b/UI/win-update/updater/http.cpp @@ -293,10 +293,10 @@ static bool ReadHTTPZippedFile(z_stream *strm, HANDLE updateFile, string &zipBuf, const uint8_t *buffer, DWORD outSize, int *responseCode) { - do { - strm->avail_in = outSize; - strm->next_in = buffer; + strm->avail_in = outSize; + strm->next_in = buffer; + do { strm->avail_out = (uInt)zipBuf.size(); strm->next_out = (Bytef *)zipBuf.data();