aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-12-03 21:33:18 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-31 19:51:57 +0100
commit3bd30882b1d50e45cbb97e754b361982dfc81e8e (patch)
treeed657d4f78bb3dd0f17ba0de2d75f4bf2051c60e
parent573cfcc52b8df0e1490257dcb6a823b0259e6448 (diff)
downloadffmpeg-3bd30882b1d50e45cbb97e754b361982dfc81e8e.tar.gz
avcodec/atrac9dec: Check q_unit_cnt more completely before using it to access at9_tab_band_ext_group
Fixes: index 8 out of bounds for type 'const uint8_t [8][3]' Fixes: 19127/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5709394985091072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e1d836d2375c93cbc44a2b0d34e404682c1e8436) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/atrac9dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index 6d4e6d8ec5..71c4d8330b 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -202,7 +202,7 @@ static inline int parse_band_ext(ATRAC9Context *s, ATRAC9BlockData *b,
int ext_band = 0;
if (b->has_band_ext) {
- if (b->q_unit_cnt < 13)
+ if (b->q_unit_cnt < 13 || b->q_unit_cnt > 20)
return AVERROR_INVALIDDATA;
ext_band = at9_tab_band_ext_group[b->q_unit_cnt - 13][2];
if (stereo) {