mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-18 21:07:01 +00:00
avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()
Fixes undefined shift Fixes: usan_shift Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8efaee3710
commit
ea791c080d
@ -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)
|
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) {
|
if (flt) {
|
||||||
switch (bps) {
|
switch (bps) {
|
||||||
case 32:
|
case 32:
|
||||||
|
Loading…
Reference in New Issue
Block a user