avcodec/bitstream: Check for integer code truncation in build_table()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 5 Jun 2019 10:18:54 +0000 (12:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Jun 2019 19:36:39 +0000 (21:36 +0200)
commite78b0f83748f92ea9e93b21c36082e0dd04d7cb1
tree1c97a9bdb12597f72b24fdb0894bb3ff6595c487
parent2a0f23b9d647ad84e0351b43ca4b552add00c8dc
avcodec/bitstream: Check for integer code truncation in build_table()

Fixes: out of array read
Fixes: 14563/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5646451545210880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/bitstream.c