mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/utils: Check sample rate before use for AV_CODEC_ID_BINKAUDIO_DCT in get_audio_frame_duration()
Fixes: shift exponent 95 is too large for 32-bit type 'int' Fixes: 26590/clusterfuzz-testcase-minimized-ffmpeg_dem_SMACKER_fuzzer-5120609937522688 Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit ec7e0d42884b40ce93b6b5e94de5f7849310f8a0) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5e8bff6c24
commit
c0b0cb5d80
@ -3473,8 +3473,11 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
|
||||
|
||||
if (ch > 0) {
|
||||
/* calc from sample rate and channels */
|
||||
if (id == AV_CODEC_ID_BINKAUDIO_DCT)
|
||||
if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
|
||||
if (sr / 22050 > 22)
|
||||
return 0;
|
||||
return (480 << (sr / 22050)) / ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user