aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-12-11 22:37:07 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-12-24 02:55:52 +0100
commit93270930798da368d5b1954a73ef7ff9dfa48f73 (patch)
tree956231618eddcbec2eaab5232d8ba0de60349c12 /libavcodec/utils.c
parent361d24e6d920e4f7e4e5fa1fd6fbb6922bff35f2 (diff)
downloadffmpeg-93270930798da368d5b1954a73ef7ff9dfa48f73.tar.gz
avcodec/utils: Fix block align overflow for ADPCM_IMA_WAV
Fixes: signed integer overflow: 529008646 * 8 cannot be represented in type 'int' Fixes: 383379145/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6674045107503104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2c478ede13..dd846b4ae9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -729,7 +729,7 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
case AV_CODEC_ID_ADPCM_IMA_WAV:
if (bps < 2 || bps > 5)
return 0;
- tmp = blocks * (1LL + (ba - 4 * ch) / (bps * ch) * 8);
+ tmp = blocks * (1LL + (ba - 4 * ch) / (bps * ch) * 8LL);
break;
case AV_CODEC_ID_ADPCM_IMA_DK3:
tmp = blocks * (((ba - 16LL) * 2 / 3 * 4) / ch);