PR #23696 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23696 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23696.patch
Fixes: 525566001/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5952332261818368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> >From f6d6dfcc6a7c6caca27eaa5472bc1118d8cafbd5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Fri, 3 Jul 2026 04:47:40 +0200 Subject: [PATCH] avformat/mov: avoid overflow/negative discard sample duration Fixes: 525566001/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5952332261818368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 90b01f9499..119be34006 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -11661,7 +11661,7 @@ static int mov_finalize_packet(AVFormatContext *s, AVStream *st, AVIndexEntry *s int64_t duration = pkt->duration; if (av_sat_add64(pkt->pts, pkt->duration) > st->duration) - duration = st->duration - pkt->pts; + duration = FFMAX(av_sat_sub64(st->duration, pkt->pts), 0); duration = av_rescale_q(duration, st->time_base, (AVRational){ 1, st->codecpar->sample_rate }); if (!ffstream(st)->first_discard_sample) -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
