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

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

commit 5d6c488db736dfd7d12f034e8b2b8ec2a9fc4bd6
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Feb 4 16:43:39 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Tue May 5 18:54:59 2026 +0200

    avformat/hls: Check for integer overflow with #EXTINF:
    
    Found-by: 이동준 <[email protected]>
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit f112ae503e98d9e6cf506f3a0b549aea447dc4c2)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/hls.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index aa57490b56..9a435041dd 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -929,8 +929,13 @@ static int parse_playlist(HLSContext *c, const char *url,
             if (pls)
                 pls->finished = 1;
         } else if (av_strstart(line, "#EXTINF:", &ptr)) {
+            double d = atof(ptr) * AV_TIME_BASE;
+            if (d < 0 || d > INT64_MAX || isnan(d)) {
+                av_log(c->ctx, AV_LOG_WARNING, "EXTINF %f unsupported\n", d / 
AV_TIME_BASE);
+                d = 0;
+            }
+            duration = d;
             is_segment = 1;
-            duration   = atof(ptr) * AV_TIME_BASE;
         } else if (av_strstart(line, "#EXT-X-BYTERANGE:", &ptr)) {
             seg_size = strtoll(ptr, NULL, 10);
             ptr = strchr(ptr, '@');

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to