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>
}
b->grad_boundary = get_bits(gb, 4);
- if (grad_range[0] >= grad_range[1] || grad_range[1] > 47)
+ if (grad_range[0] >= grad_range[1] || grad_range[1] > 31)
return AVERROR_INVALIDDATA;
if (b->grad_boundary > b->q_unit_cnt)