Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2017-08-29 22:49:43 +0300
committerKornel <kornel@geekhood.net>2017-08-29 22:49:43 +0300
commitb5dc853b2496447f0a54b3b25cb2659b575c56ef (patch)
tree82b48a2ca0f97915b2aeeb7ae9456711f13cd49a /CPP/7zip/Compress/Rar5Decoder.cpp
parent2efa10565ac395d2ce9a679ead46e70fb2f963eb (diff)
17.0117.01
Diffstat (limited to 'CPP/7zip/Compress/Rar5Decoder.cpp')
-rw-r--r--CPP/7zip/Compress/Rar5Decoder.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/CPP/7zip/Compress/Rar5Decoder.cpp b/CPP/7zip/Compress/Rar5Decoder.cpp
index 6b6e80d1..64cce79b 100644
--- a/CPP/7zip/Compress/Rar5Decoder.cpp
+++ b/CPP/7zip/Compress/Rar5Decoder.cpp
@@ -196,6 +196,8 @@ HRESULT CDecoder::ExecuteFilter(const CFilter &f)
default:
_unsupportedFilter = true;
+ memset(_filterSrc, 0, f.Size);
+ // return S_OK; // unrar
}
return WriteData(useDest ?
@@ -301,7 +303,11 @@ HRESULT CDecoder::AddFilter(CBitDecoder &_bitStream)
UInt32 blockStart = ReadUInt32(_bitStream);
f.Size = ReadUInt32(_bitStream);
- // if (f.Size > ((UInt32)1 << 16)) _unsupportedFilter = true;
+ if (f.Size > ((UInt32)1 << 22))
+ {
+ _unsupportedFilter = true;
+ f.Size = 0; // unrar 5.5.5
+ }
f.Type = (Byte)_bitStream.ReadBits9fix(3);
f.Channels = 0;