This commit is contained in:
Igor Pavlov
2022-06-23 11:43:16 +01:00
committed by Kornel
parent c3529a41f5
commit ec44a8a070
1248 changed files with 15242 additions and 2443 deletions

4
CPP/7zip/Compress/BitlDecoder.h Normal file → Executable file
View File

@@ -155,6 +155,10 @@ public:
MY_FORCE_INLINE
bool ReadAlignedByte_FromBuf(Byte &b)
{
if (this->_stream.NumExtraBytes != 0)
if (this->_stream.NumExtraBytes >= 4
|| kNumBigValueBits - this->_bitPos <= (this->_stream.NumExtraBytes << 3))
return false;
if (this->_bitPos == kNumBigValueBits)
return this->_stream.ReadByte_FromBuf(b);
b = (Byte)(_normalValue & 0xFF);