You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()
Fixes: undefined shift. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
d55568d22a
commit
2875745d35
@@ -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)
|
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;
|
return AV_CODEC_ID_NONE;
|
||||||
|
|
||||||
if (flt) {
|
if (flt) {
|
||||||
|
Reference in New Issue
Block a user