mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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 93d964689c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fa4f7b96f4
commit
433e72f7e5
@ -385,7 +385,7 @@ static int read_dst_frame(AVFormatContext *s, AVPacket *pkt)
|
|||||||
avio_skip(pb, 1);
|
avio_skip(pb, 1);
|
||||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
pkt->flags |= AV_PKT_FLAG_KEY;
|
||||||
pkt->stream_index = 0;
|
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;
|
pkt->pos = chunk_pos;
|
||||||
|
|
||||||
chunk_pos = avio_tell(pb);
|
chunk_pos = avio_tell(pb);
|
||||||
|
Loading…
Reference in New Issue
Block a user