Commit 2875745d authored by Chris Cunningham's avatar Chris Cunningham Committed by Michael Niedermayer

avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()

Fixes: undefined shift.
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent d55568d2
......@@ -2955,7 +2955,7 @@ 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)
if (bps <= 0 || bps > 64)
return AV_CODEC_ID_NONE;
if (flt) {
......
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