mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 05:55:07 +00:00
avformat/concatdec: Check user_duration sum
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6434245599690752 Fixes: signed integer overflow: 9223372026773000000 + 22337000000 cannot be represented in type 'long' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1eb8cbd09c
commit
007486058c
@ -679,6 +679,8 @@ static int concat_read_header(AVFormatContext *avf)
|
||||
cat->files[i].user_duration = cat->files[i].outpoint - cat->files[i].inpoint;
|
||||
}
|
||||
cat->files[i].duration = cat->files[i].user_duration;
|
||||
if (time + (uint64_t)cat->files[i].user_duration > INT64_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
time += cat->files[i].user_duration;
|
||||
}
|
||||
if (i == cat->nb_files) {
|
||||
|
Loading…
Reference in New Issue
Block a user