aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-05-18 10:37:26 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-11 20:18:45 +0100
commit9d54c5834ca7f2537a3b59e67101d1d5cc30d734 (patch)
tree1a0a21f784645b852f2e4651d3f7760fd874c33e /libavcodec
parent7c6bc6c84ca52ba1c5de71ce55a7b378dc9b521a (diff)
downloadffmpeg-9d54c5834ca7f2537a3b59e67101d1d5cc30d734.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacdec_template.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 7ce8c33d55..0724cf7669 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2492,6 +2492,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++) {