summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-04-24 15:41:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-06-18 18:58:25 +0200
commit93d964689c3b2bae26e6e3f502c1ffc4c2e46989 (patch)
treebb23a7f6f85a0f8a7ae7ccf62c1dd73747cd3cfc
parent6ea494befcb5d944ce8275e6f59de1a24c25ffb6 (diff)
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>
-rw-r--r--libavformat/iff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 74d96988a7..078406b7e3 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -384,7 +384,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);