[FFmpeg-cvslog] avformat/iff: Use 64bit in duration computation
Michael Niedermayer
git at videolan.org
Wed Sep 8 22:42:22 EEST 2021
ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Apr 24 15:41:16 2021 +0200| [ce60ee3e5c650dfaee4a2343c208960413eb75d1] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 93d964689c3b2bae26e6e3f502c1ffc4c2e46989)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce60ee3e5c650dfaee4a2343c208960413eb75d1
---
libavformat/iff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/iff.c b/libavformat/iff.c
index b07b6c8b18..c15302d3c5 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);
More information about the ffmpeg-cvslog
mailing list