Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-09-17 17:32:08 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-25 14:51:58 +0300
commitdf30441b1639b58a3d8ad61618544b8f82a65a0c (patch)
tree76d31298e50ac7dbf50d44e6f219ce889f64ce35
parent21b786d628f6f9b9ff1275994d50b83c0b835635 (diff)
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index a3ad095482..b1dbeae06f 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -369,6 +369,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);