summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-13 13:57:41 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-13 15:57:56 +0000
commit870fd86e13fc95e8cf3165a134767c56d58b8987 (patch)
tree993b0f959316f545147a8ee60bea546cbc4aad68
parent13f505539c5c0deff72cc1c007eaa9be1979d294 (diff)
downloaduxp-870fd86e13fc95e8cf3165a134767c56d58b8987.tar.gz
[libjar] Fix inflation logic.
This has been broken for 11 years. About time it's fixed. Tag #1683
-rw-r--r--modules/libjar/nsJARInputStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/libjar/nsJARInputStream.cpp b/modules/libjar/nsJARInputStream.cpp
index 6993dd578f..086c21ab4f 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!