[codec,nsc] fix missing check

in nsc_rle_decode abort if there are more bytes to be read then there
are left.
This commit is contained in:
akallabeth 2024-04-16 08:26:37 +02:00 committed by Martin Fleisz
parent 2500fb7bfb
commit d58cbc96ac

View File

@ -160,7 +160,7 @@ static BOOL nsc_rle_decode(const BYTE* in, size_t inSize, BYTE* out, UINT32 outS
len |= ((UINT32)(*in++)) << 24U;
}
if (outSize < len)
if ((outSize < len) || (left < len))
return FALSE;
outSize -= len;