aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Compress/BitlDecoder.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/7zip/Compress/BitlDecoder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/CPP/7zip/Compress/BitlDecoder.h b/CPP/7zip/Compress/BitlDecoder.h
index e85942c..825864d 100644
--- a/CPP/7zip/Compress/BitlDecoder.h
+++ b/CPP/7zip/Compress/BitlDecoder.h
@@ -155,6 +155,10 @@ public:
155 MY_FORCE_INLINE 155 MY_FORCE_INLINE
156 bool ReadAlignedByte_FromBuf(Byte &b) 156 bool ReadAlignedByte_FromBuf(Byte &b)
157 { 157 {
158 if (this->_stream.NumExtraBytes != 0)
159 if (this->_stream.NumExtraBytes >= 4
160 || kNumBigValueBits - this->_bitPos <= (this->_stream.NumExtraBytes << 3))
161 return false;
158 if (this->_bitPos == kNumBigValueBits) 162 if (this->_bitPos == kNumBigValueBits)
159 return this->_stream.ReadByte_FromBuf(b); 163 return this->_stream.ReadByte_FromBuf(b);
160 b = (Byte)(_normalValue & 0xFF); 164 b = (Byte)(_normalValue & 0xFF);