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 83bfe18d4182008489e351c5ddfb852446e94ef1
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 17:00:22 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 04:36:59 2026 +0100

    avformat/imfdec: rescale the seek target without multiplying ints
    
    Fixes: signed integer overflow: 48000 * 1048576 cannot be represented in 
type 'int'
    Fixes: A5TJ4YnA1yYe
    
    Found during the triage of a finding from the review of 
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25795
    
    Signed integer overflow Replicated through UnModified FFmpeg with UBSAN
    
    (cherry picked from commit 06194631698303b77c84d7c5729f45bc5b8ffc64)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/imfdec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index 6b4bb2ac94..e92c968865 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -996,9 +996,7 @@ static int imf_seek(AVFormatContext *s, int stream_index, 
int64_t min_ts,
                          st->time_base))
             av_log(s, AV_LOG_WARNING, "Seek position is not coherent across 
tracks\n");
 
-        dts = av_rescale(ts,
-                         st->time_base.den * c->cpl->edit_rate.den,
-                         st->time_base.num * c->cpl->edit_rate.num);
+        dts = av_rescale_q(ts, av_inv_q(c->cpl->edit_rate), st->time_base);
 
         av_log(s, AV_LOG_DEBUG, "Seeking to dts=%" PRId64 " on 
stream_index=%d\n",
                dts, i);

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