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

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

commit 14a4f309bf4e600d28937ae9a066f3dec7965e56
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Apr 28 13:41:15 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Mon May 4 17:13:36 2026 +0200

    avcodec/notchlc: Check 255 loops
    
    Fixes: integer overflow
    
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 05817dc7dd269bcdb9ded330d0bbfb70511697a9)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/notchlc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c
index dd3b580a67..a63f5abcdb 100644
--- a/libavcodec/notchlc.c
+++ b/libavcodec/notchlc.c
@@ -88,6 +88,8 @@ static int lz4_decompress(AVCodecContext *avctx,
             unsigned char current;
             do {
                 current = bytestream2_get_byte(gb);
+                if (current > INT_MAX - num_literals)
+                    return AVERROR_INVALIDDATA;
                 num_literals += current;
             } while (current == 255);
         }
@@ -120,6 +122,8 @@ static int lz4_decompress(AVCodecContext *avctx,
 
             do {
                 current = bytestream2_get_byte(gb);
+                if (current > INT_MAX - match_length)
+                    return AVERROR_INVALIDDATA;
                 match_length += current;
             } while (current == 255);
         }

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

Reply via email to