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

Git pushed a commit to branch master
in repository ffmpeg.

commit 16d1c045924fc6d42bdca45bc6db22d5ba3ab8f8
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Nov 16 16:22:55 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Tue Nov 17 17:56:11 2026 +0000

    avcodec/exif: check the MakerNote size against each vendor header
    
    The Apple header is 14 bytes long, only 12 bytes were ensured.
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
    
    Fixes: out of array read
    Fixes: 
574983318/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WEBP_fuzzer-6338666226843648
    Fixes: W5fFPYXZ8Df6
    Regression since: e5a3f55c017ddaf9eeecba2a2977d7734f5f7453
    
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/exif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index 58151914c5..6bf789ad38 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -466,7 +466,8 @@ static int exif_get_makernote_offset(GetByteContext *gb)
         return -1;
 
     for (int i = 0; i < FF_ARRAY_ELEMS(makernote_data); i++) {
-        if (!memcmp(gb->buffer, makernote_data[i].header, 
makernote_data[i].header_size))
+        if (bytestream2_get_bytes_left(gb) >= makernote_data[i].header_size &&
+            !memcmp(gb->buffer, makernote_data[i].header, 
makernote_data[i].header_size))
             return makernote_data[i].result;
     }
 

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