mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/aqtitledec: Skip unrepresentable durations
Fixes: signed integer overflow: -5 - 9223372036854775807 cannot be represented in type 'long'
Fixes: 45665/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-475618463934054
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 c2d1597a8a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fde82db169
commit
b90c01a501
@ -74,7 +74,8 @@ static int aqt_read_header(AVFormatContext *s)
|
||||
new_event = 1;
|
||||
pos = avio_tell(s->pb);
|
||||
if (sub) {
|
||||
sub->duration = frame - sub->pts;
|
||||
if (frame >= sub->pts && (uint64_t)frame - sub->pts < INT64_MAX)
|
||||
sub->duration = frame - sub->pts;
|
||||
sub = NULL;
|
||||
}
|
||||
} else if (*line) {
|
||||
|
Loading…
Reference in New Issue
Block a user