avcodec/pcm: Check bits_per_coded_sample
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 28 Sep 2019 23:22:37 +0000 (01:22 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 10 Oct 2019 12:34:20 +0000 (14:34 +0200)
commit5de19160a3c0dedb3cefd00e863a8d8f74ca2ad0
tree668e43fd54f3d02bdae2aefed54f566274ae0e37
parent6d18b62db96bf52b70462e9d867f71cb0f12d1a4
avcodec/pcm: Check bits_per_coded_sample

Fixes: shift exponent -2 is negative
Fixes: 17736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F16LE_fuzzer-5742815929171968
Fixes: 17998/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F24LE_fuzzer-5716980383875072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pcm.c