mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-20 13:26:39 +00: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>
(cherry picked from commit 2875745d35
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6d560d4a0b
commit
695dc70aeb
@ -2650,7 +2650,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user