From 870fd86e13fc95e8cf3165a134767c56d58b8987 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 13 Nov 2020 13:57:41 +0000 Subject: [libjar] Fix inflation logic. This has been broken for 11 years. About time it's fixed. Tag #1683 --- modules/libjar/nsJARInputStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/libjar') diff --git a/modules/libjar/nsJARInputStream.cpp b/modules/libjar/nsJARInputStream.cpp index 6993dd578..086c21ab4 100644 --- a/modules/libjar/nsJARInputStream.cpp +++ b/modules/libjar/nsJARInputStream.cpp @@ -195,7 +195,7 @@ MOZ_WIN_MEM_TRY_BEGIN return ReadDirectory(aBuffer, aCount, aBytesRead); case MODE_INFLATE: - if (mFd) { + if (mZs.total_out < mOutSize) { rv = ContinueInflate(aBuffer, aCount, aBytesRead); } // be aggressive about releasing the file! -- cgit v1.2.3