diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-04-24 15:41:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-11 21:23:49 +0200 |
commit | 7a62ddb3cdfd63bd59f5d80a39b8f3a034ad7728 (patch) | |
tree | f623bd1aad91df4ccc5852a637dd900c9dc7e1b1 /libavformat | |
parent | d4755459b3b929f547ec7c9af4f5f5fcb15aeb5c (diff) | |
download | ffmpeg-7a62ddb3cdfd63bd59f5d80a39b8f3a034ad7728.tar.gz |
avformat/iff: Use 64bit in duration computation
Fixes: signed integer overflow: 588 * 16719904 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-6748331936186368
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 93d964689c3b2bae26e6e3f502c1ffc4c2e46989)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index 05e79ace75..5be0eb55b7 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -385,7 +385,7 @@ static int read_dst_frame(AVFormatContext *s, AVPacket *pkt) avio_skip(pb, 1); pkt->flags |= AV_PKT_FLAG_KEY; pkt->stream_index = 0; - pkt->duration = 588 * s->streams[0]->codecpar->sample_rate / 44100; + pkt->duration = 588LL * s->streams[0]->codecpar->sample_rate / 44100; pkt->pos = chunk_pos; chunk_pos = avio_tell(pb); |