[FFmpeg-cvslog] avformat/aiffdec: Check block_duration

Michael Niedermayer git at videolan.org
Wed Oct 12 15:46:57 EEST 2022


ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 17 16:32:08 2022 +0200| [5ebbc03baaec3b6a41508798d5a3de5381659e4d] | committer: Michael Niedermayer

avformat/aiffdec: Check block_duration

Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 1c2b6265c87417033f990fa4a14da9d4008320a4)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/aiffdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index da5a428b86..25ad9151db 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -357,6 +357,8 @@ got_sound:
         av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n");
         return -1;
     }
+    if (aiff->block_duration < 0)
+        return AVERROR_INVALIDDATA;
 
     /* Now positioned, get the sound data start and end */
     avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);



More information about the ffmpeg-cvslog mailing list