This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit 1e3dc544b6a3d1141f7307b158540b038c766da7
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Nov 16 06:56:47 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 14:55:53 2026 +0100

    avformat/demux: saturate the end sample used for the discard padding
    
    Signed integer overflow Replicated through UnModified FFmpeg with UBSAN
    
    Fixes: signed integer overflow: 8479735170118198272 + 942192796679799808 
cannot be represented in type 'int64_t' (aka 'long')
    Fixes: 
584661914/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5041842006327296
    Fixes: FgJWeOCmmFCb
    
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 342cb6374fee2e7a86b35235203e3eefc9572969)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/demux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index 4d4ada7d44..ad539e1507 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -1561,7 +1561,7 @@ static int read_frame_internal(AVFormatContext *s, 
AVPacket *pkt)
             int64_t pts = pkt->pts - (is_relative(pkt->pts) ? RELATIVE_TS_BASE 
: 0);
             int64_t sample = ts_to_samples(st, pts);
             int64_t duration = FFMAX(st->codecpar->frame_size, 
ts_to_samples(st, pkt->duration));
-            int64_t end_sample = sample + duration;
+            int64_t end_sample = av_sat_add64(sample, duration);
             if (duration > 0 && end_sample >= sti->first_discard_sample &&
                 sample < sti->last_discard_sample)
                 discard_padding = FFMIN(end_sample - 
sti->first_discard_sample, duration);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to