aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-06-24 20:00:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 22:02:21 +0200
commitff1bb8ce6bbfade1193716b64e7ec7051db4727f (patch)
treeaf4bc41457ef980d4fa59150223a8022daa3bfdc
parent3b7ece0fcc06f5d59a5a0feed72495a3274b690d (diff)
downloadffmpeg-ff1bb8ce6bbfade1193716b64e7ec7051db4727f.tar.gz
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 00ae9b77ef757f82660b4b3d2f490374a4f209fd) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4be47b71ee..b11f6a7d0e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3694,7 +3694,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_LE:
if (extradata)
- return frame_bytes * 14 / (8 * ch);
+ return frame_bytes * 14LL / (8 * ch);
break;
case AV_CODEC_ID_ADPCM_XA:
return (frame_bytes / 128) * 224 / ch;