提交 e1d836d2 编写于 作者: M Michael Niedermayer

avcodec/atrac9dec: Check q_unit_cnt more completely before using it to access...

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/ffmpegReviewed-by: NLynne <dev@lynne.ee>
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 b7583230
......@@ -199,7 +199,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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册