[codec,ncrush] fix missing input length check
This commit is contained in:
parent
9da3f23698
commit
91a1535f88
@ -2068,6 +2068,12 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (SrcSize < 4)
|
||||
{
|
||||
WLog_ERR(TAG, "Input size short: SrcSize %" PRIu32 " < 4", SrcSize);
|
||||
return -1;
|
||||
}
|
||||
|
||||
const BYTE* SrcEnd = &pSrcData[SrcSize];
|
||||
const BYTE* SrcPtr = pSrcData + 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user