diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-18 10:37:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:11:55 +0200 |
commit | 806d1e3253e19379afd2dacff80df1fd1b52b726 (patch) | |
tree | 779cf38c4a11a13492db09dcb8ae06934b7a495a | |
parent | 1a18b090314eb5fc0480b3aba433c14422b00384 (diff) | |
download | ffmpeg-806d1e3253e19379afd2dacff80df1fd1b52b726.tar.gz |
avcodec/aacdec_template: skip apply_tns() if max_sfb is 0 (from previous header decode failure)
Fixes: NULL pointer dereference
Fixes: 14723/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5654612436058112
Fixes: 14724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5712607111020544
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cf3156e762bbd3fbaf9da53f3ef1ea6d1bad2ec5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/aacdec_template.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 9aebbad476..bb9eee4f98 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -2401,6 +2401,9 @@ static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, INTFLOAT tmp[TNS_MAX_ORDER+1]; UINTFLOAT *coef = coef_param; + if(!mmm) + return; + for (w = 0; w < ics->num_windows; w++) { bottom = ics->num_swb; for (filt = 0; filt < tns->n_filt[w]; filt++) { |