Fixes: signed integer overflow: 40000 - -9223372036854770000 cannot be represented in type 'long' Fixes: 427262541/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4831506940100608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavformat/concatdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index fe65d0c7688..e0c2c872482 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -326,7 +326,7 @@ static int64_t get_best_effort_duration(ConcatFile *file, AVFormatContext *avf) if (file->outpoint != AV_NOPTS_VALUE) return av_sat_sub64(file->outpoint, file->file_inpoint); if (avf->duration > 0) - return avf->duration - (file->file_inpoint - file->file_start_time); + return av_sat_sub64(avf->duration, file->file_inpoint - file->file_start_time); if (file->next_dts != AV_NOPTS_VALUE) return file->next_dts - file->file_inpoint; return AV_NOPTS_VALUE; -- 2.49.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".