avcodec/atrac9dec: Check grad_range[1] more tightly
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 3 Aug 2019 22:45:20 +0000 (00:45 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 5 Aug 2019 15:50:27 +0000 (17:50 +0200)
commit208225bd782207aaf2b380522f96fd4fe4dc3441
tree3731bc95a2c92b9c552df4b17833c6d173fc5300
parentd555a220b461f766ad36e8abfd1324585f32495b
avcodec/atrac9dec: Check grad_range[1] more tightly

Alternatively the array could be made bigger but the extra values
would not be read without other changes.

Fixes: Out of array access
Fixes: 15658/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5738260074070016

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>
libavcodec/atrac9dec.c