Browse Source

avcodec/atrac9dec: Check q_unit_cnt in parse_band_ext()

Fixes: global-buffer-overflow
Fixes: 15247/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5671602181636096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2
Michael Niedermayer 6 years ago
parent
commit
fb4a4557d1
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/atrac9dec.c

+ 2
- 0
libavcodec/atrac9dec.c View File

@@ -202,6 +202,8 @@ 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)
return AVERROR_INVALIDDATA;
ext_band = at9_tab_band_ext_group[b->q_unit_cnt - 13][2];
if (stereo) {
b->channel[1].band_ext = get_bits(gb, 2);


Loading…
Cancel
Save