Check that the SBR decoder has been properly initialized

This probably doesn't fix the root cause, but at least fixes
the issues found in this particular fuzzed sample.

Fixes: 1994/clusterfuzz-testcase-minimized-6368089497141248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
Martin Storsjo 2017-06-10 13:58:13 +03:00
parent 40e15b58d0
commit 3bfec4eaef
1 changed files with 4 additions and 0 deletions

View File

@ -1039,6 +1039,10 @@ resetSbrDec(HANDLE_SBR_DEC hSbrDec, HANDLE_SBR_HEADER_DATA hHeaderData,
FIXP_DBL **OverlapBufferReal = hSbrDec->qmfDomainInCh->hQmfSlotsReal; FIXP_DBL **OverlapBufferReal = hSbrDec->qmfDomainInCh->hQmfSlotsReal;
FIXP_DBL **OverlapBufferImag = hSbrDec->qmfDomainInCh->hQmfSlotsImag; FIXP_DBL **OverlapBufferImag = hSbrDec->qmfDomainInCh->hQmfSlotsImag;
if (!hSbrDec->LppTrans.pSettings) {
return SBRDEC_NOT_INITIALIZED;
}
/* in case the previous frame was not active in terms of SBR processing, the /* in case the previous frame was not active in terms of SBR processing, the
full band from 0 to no_channels was rescaled and not overwritten. Thats why full band from 0 to no_channels was rescaled and not overwritten. Thats why
the scaling factor lb_scale can be seen as assigned to all bands from 0 to the scaling factor lb_scale can be seen as assigned to all bands from 0 to