aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-09-17 16:32:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-22 17:44:05 +0200
commit9303ba272e988d87084880c57056b750cc5ffd08 (patch)
treee82a559b221abfe92857d5e195944527b79b9ef2 /libavformat
parent1c2b6265c87417033f990fa4a14da9d4008320a4 (diff)
downloadffmpeg-9303ba272e988d87084880c57056b750cc5ffd08.tar.gz
avformat/aiffdec: Use 64bit for block_duration use
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiffdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 318e3ad742..80733e5801 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -428,7 +428,7 @@ static int aiff_read_packet(AVFormatContext *s,
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
/* Only one stream in an AIFF file */
pkt->stream_index = 0;
- pkt->duration = (res / st->codecpar->block_align) * aiff->block_duration;
+ pkt->duration = (res / st->codecpar->block_align) * (int64_t) aiff->block_duration;
return 0;
}