ffmpeg | branch: release/7.1 | Michael Niedermayer <mich...@niedermayer.cc> | 
Wed Dec 11 22:37:07 2024 +0100| [8ae93fdc426a6fc4beb19dc728daae89477fb53a] | 
committer: Michael Niedermayer

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 <mich...@niedermayer.cc>
(cherry picked from commit 93270930798da368d5b1954a73ef7ff9dfa48f73)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ae93fdc426a6fc4beb19dc728daae89477fb53a
---

 libavcodec/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d68e672e0a..a63ca71a44 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -723,7 +723,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);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to