diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-17 16:32:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-24 22:58:18 +0200 |
commit | 4143d0a33a8f5eb16e36367975cea3dc3f8ca8fc (patch) | |
tree | 8f3229911b4b3993779a413c4c63f83645579178 | |
parent | a3d59e33d91402325f70b55f4a9c185a3d01e5a6 (diff) | |
download | ffmpeg-4143d0a33a8f5eb16e36367975cea3dc3f8ca8fc.tar.gz |
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@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1c2b6265c87417033f990fa4a14da9d4008320a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/aiffdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 0487d3f029..318e3ad742 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -372,6 +372,8 @@ got_sound: av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n"); return AVERROR_INVALIDDATA; } + 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); |