Commit ea791c08 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()

Fixes undefined shift
Fixes: usan_shift
Found-by: 's avatarThomas Guilbert <tguilbert@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8efaee37
......@@ -2955,6 +2955,9 @@ enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags)
{
if (bps > 64U)
return AV_CODEC_ID_NONE;
if (flt) {
switch (bps) {
case 32:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment