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

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

commit 4dffdd1a9263c1947ef5899079636500ae1e10d8
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Feb 6 22:05:06 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Mon May 4 15:57:11 2026 +0200

    avcodec/h264_parser: Check remaining input length in loop in 
scan_mmco_reset()
    
    Fixes: read of uninitialized memory
    Fixes: 
476177761/clusterfuzz-testcase-minimized-ffmpeg_dem_H264_fuzzer-6400884824408064
    
    Found-by:  continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 73681f888da4705e33a9211cb31c2a5ef4d6c85c)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/h264_parser.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 94cfbc481e..2d9da5bf35 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -223,6 +223,9 @@ static int scan_mmco_reset(AVCodecParserContext *s, 
GetBitContext *gb,
     if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag
         int i;
         for (i = 0; i < H264_MAX_MMCO_COUNT; i++) {
+            if (get_bits_left(gb) < 1)
+                return AVERROR_INVALIDDATA;
+
             MMCOOpcode opcode = get_ue_golomb_31(gb);
             if (opcode > (unsigned) MMCO_LONG) {
                 av_log(logctx, AV_LOG_ERROR,

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

Reply via email to