aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-06-10 13:58:13 +0300
committerMartin Storsjo <martin@martin.st>2017-06-12 23:44:59 +0300
commite7f36eed224b9530cf0eb7e56d6c43d3de14429e (patch)
treeb1f6444f4c9e06e67cd479d05586ff35c474221a
parent39e13c1acbca94f562f9776e1555ced50dd0dfcd (diff)
downloadfdk-aac-e7f36eed224b9530cf0eb7e56d6c43d3de14429e.tar.gz
fdk-aac-e7f36eed224b9530cf0eb7e56d6c43d3de14429e.tar.bz2
fdk-aac-e7f36eed224b9530cf0eb7e56d6c43d3de14429e.zip
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
-rw-r--r--libSBRdec/src/sbr_dec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libSBRdec/src/sbr_dec.cpp b/libSBRdec/src/sbr_dec.cpp
index 0864348..76009ba 100644
--- a/libSBRdec/src/sbr_dec.cpp
+++ b/libSBRdec/src/sbr_dec.cpp
@@ -940,6 +940,10 @@ resetSbrDec (HANDLE_SBR_DEC hSbrDec,
FIXP_DBL **OverlapBufferReal = hSbrDec->QmfBufferReal;
FIXP_DBL **OverlapBufferImag = hSbrDec->QmfBufferImag;
+ if (!hSbrDec->LppTrans.pSettings) {
+ return SBRDEC_NOT_INITIALIZED;
+ }
+
/* assign qmf time slots */
assignTimeSlots( hSbrDec, hHeaderData->numberTimeSlots * hHeaderData->timeStep, useLP);