mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/utils: Use 64bit for intermediate in AV_CODEC_ID_ADPCM_THP* duration calculation
Fixes: signed integer overflow: 486539264 * 14 cannot be represented in type 'int'
Fixes: 35281/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6068262742917120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 00ae9b77ef
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5f891809d7
commit
417bc2a5b0
@ -749,7 +749,7 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
|
|||||||
case AV_CODEC_ID_ADPCM_THP:
|
case AV_CODEC_ID_ADPCM_THP:
|
||||||
case AV_CODEC_ID_ADPCM_THP_LE:
|
case AV_CODEC_ID_ADPCM_THP_LE:
|
||||||
if (extradata)
|
if (extradata)
|
||||||
return frame_bytes * 14 / (8 * ch);
|
return frame_bytes * 14LL / (8 * ch);
|
||||||
break;
|
break;
|
||||||
case AV_CODEC_ID_ADPCM_XA:
|
case AV_CODEC_ID_ADPCM_XA:
|
||||||
return (frame_bytes / 128) * 224 / ch;
|
return (frame_bytes / 128) * 224 / ch;
|
||||||
|
Loading…
Reference in New Issue
Block a user