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 a919f3d5d909b9f700121b56e0a6346568be2c76
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Oct 29 00:00:07 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 02:32:43 2026 +0100

    avcodec/jpegxl_parser: stop before a TOC that cannot fit in the input
    
    Fixes: QbQGn4p3g48Q
    Fixes: AISLE-2026-0150-00842
    Fixes: Timeout
    Timeout Replicated through UnModified FFmpeg with /usr/bin/time
    
    Found-by: Joshua Rogers <[email protected]>
    (cherry picked from commit bc896c613ec0d4ad0108d62fbdda0196f69e7121)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/jpegxl_parser.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/jpegxl_parser.c b/libavcodec/jpegxl_parser.c
index a16a2733f9..73097efc9c 100644
--- a/libavcodec/jpegxl_parser.c
+++ b/libavcodec/jpegxl_parser.c
@@ -1317,6 +1317,10 @@ static int parse_frame_header(void *avctx, 
JXLParseContext *ctx, GetBitContext *
     else
         toc_count = 2 + num_lf_groups + num_groups * num_passes;
 
+    /* each TOC entry takes at least 12 bits */
+    if ((int64_t)toc_count * 12 > get_bits_left(gb))
+        return AVERROR_BUFFER_TOO_SMALL;
+
     // permuted toc
     if (get_bits1(gb)) {
         JXLEntropyDecoder dec;

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