diff options
author | Chris Cunningham <chcunningham@chromium.org> | 2016-05-17 11:28:32 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-17 23:47:24 +0200 |
commit | 2875745d354ab0ebc4af1ebaca5c5a8d26ccdc03 (patch) | |
tree | fc6efe5e11130be52e995108e79388ce7d8d26cd | |
parent | d55568d22a5a6e59c087b8614227d5a0a3da4164 (diff) |
avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()
Fixes: undefined shift.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 5f5f03e6ec..d1e4306906 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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) { |