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

Git pushed a commit to branch master
in repository ffmpeg.

commit 7b6e2f3a2a03e72e1f5a4e9845f8081dd9fc1f52
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 6 23:17:37 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Wed Oct 14 17:45:20 2026 +0000

    fftools/ffmpeg_mux: Avoid signed overflow in the invalid DTS fix-up
    
    Fixes: signed integer overflow
    Fixes: YK9ibCaczocG
    Fixes: C041.heic
    Signed integer overflow Replicated through UnModified FFmpeg with UBSAN
    Found during triage of the security report GL61hVKFlOuU
---
 fftools/ffmpeg_mux.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 9e7ebd3016..a6991afd87 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -166,9 +166,7 @@ static int mux_fixup_ts(Muxer *mux, MuxStream *ms, AVPacket 
*pkt)
             av_log(ost, AV_LOG_WARNING, "Invalid DTS: %"PRId64" PTS: 
%"PRId64", replacing by guess\n",
                    pkt->dts, pkt->pts);
             pkt->pts =
-            pkt->dts = pkt->pts + pkt->dts + ms->last_mux_dts + 1
-                     - FFMIN3(pkt->pts, pkt->dts, ms->last_mux_dts + 1)
-                     - FFMAX3(pkt->pts, pkt->dts, ms->last_mux_dts + 1);
+            pkt->dts = av_clip64(ms->last_mux_dts, pkt->pts - 1, pkt->dts - 1) 
+ 1;
         }
         if ((ost->type == AVMEDIA_TYPE_AUDIO || ost->type == 
AVMEDIA_TYPE_VIDEO || ost->type == AVMEDIA_TYPE_SUBTITLE) &&
             pkt->dts != AV_NOPTS_VALUE &&

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