[coverity] 1543052 Out-of-bounds read
This commit is contained in:
parent
285bea320d
commit
6241ce5674
@ -2119,7 +2119,7 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
|
||||
CopyOffset = ncrush->OffsetCache[OffsetCacheIndex];
|
||||
const UINT16 Mask = get_word(&HuffTableMask[21]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
if (MaskedBits > ARRAYSIZE(HuffTableLOM))
|
||||
if (MaskedBits >= ARRAYSIZE(HuffTableLOM))
|
||||
return -1;
|
||||
LengthOfMatch = HuffTableLOM[MaskedBits] & 0xFFF;
|
||||
BitLength = HuffTableLOM[MaskedBits] >> 12;
|
||||
|
Loading…
Reference in New Issue
Block a user