avcodec/utils: Check bits_per_coded_sample
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 18 Jun 2019 21:55:56 +0000 (23:55 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 27 Jun 2019 15:50:47 +0000 (17:50 +0200)
commit1603661523e37940ec98e320e631886fca48fd87
tree0a214c773911ee6d2eeb293eb89129b1ccd85329
parent297c5c26cddab668f22a2595ddc0a5984ddd4056
avcodec/utils: Check bits_per_coded_sample

This avoids the need for each decoder separately having to handle this case

Fixes: shift exponent -100663046 is negative
Fixes: out of array access
Fixes: 15270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5727829913763840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d33414d2ad27a5d2193c9ab0948ba7a282c2f910)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/utils.c