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

Git pushed a commit to branch master
in repository ffmpeg.

commit 9bca133c03662a0a199fb6ddfa6ee2090e01caa1
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Oct 10 06:48:07 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Mon Oct 12 23:55:55 2026 +0000

    avformat/mov: saturate the audio pre-roll search time of an edit
    
    The search for the frame one second before an audio edit subtracted the
    time scale from the edit media time, which overflows for media times
    near INT64_MIN. Any result below the first index entry is clamped to it
    anyway, so saturating the subtraction keeps the search unchanged.
    
    Signed integer overflow Replicated through API with UBSAN
    
    Found during triage/review of OSS-Fuzz issue 476170159
    
    Fixes: signed integer overflow: -9223372036854775808 - 1000 cannot be 
represented in type 'int64_t'
    Fixes: b9W8hJVNRZGN/neg-audio-min.mp4
    Fixes: b9W8hJVNRZGN
    
    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 9e6a57d083..cb75544aa4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4622,7 +4622,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
             // Audio decoders like AAC need need a decoder delay samples 
previous to the current sample,
             // to correctly decode this frame. Hence for audio we seek to a 
frame 1 sec. before the
             // edit_list_media_time to cover the decoder delay.
-            search_timestamp = FFMAX(search_timestamp - msc->time_scale, 
e_old[0].timestamp);
+            search_timestamp = FFMAX(av_sat_sub64(search_timestamp, 
msc->time_scale), e_old[0].timestamp);
         }
 
         if (find_prev_closest_index(st, e_old, nb_old, tts_data_old, 
tts_count_old, search_timestamp, 0,

-- 
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