mirror of https://github.com/mstorsjo/fdk-aac.git
Avoid undefined shifts in SBR calcCRC
Fixes: 25404/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5397024709804032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
parent
3a831a5fbc
commit
4e944af756
|
@ -153,8 +153,10 @@ static int getCrc(HANDLE_FDK_BITSTREAM hBs, ULONG NrBits) {
|
|||
calcCRC(&CrcBuf, bValue, MAXCRCSTEP);
|
||||
}
|
||||
|
||||
bValue = FDKreadBits(hBs, CrcNrBitsRest);
|
||||
calcCRC(&CrcBuf, bValue, CrcNrBitsRest);
|
||||
if (CrcNrBitsRest > 0) {
|
||||
bValue = FDKreadBits(hBs, CrcNrBitsRest);
|
||||
calcCRC(&CrcBuf, bValue, CrcNrBitsRest);
|
||||
}
|
||||
|
||||
return (CrcBuf.crcState & SBR_CRC_RANGE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue