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

Git pushed a commit to branch master
in repository ffmpeg.

commit cc17277c36cd7a87ccc99ae0e1b9eb88cbaa43ca
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Jun 26 20:58:49 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Jun 28 00:22:09 2026 +0000

    avcodec/ffv1dec: Reject bayer with unaligned slice coordinates
    
    Bayer was introduced (4f509c9e43) with combined_version 0x4000A, so no real
    bayer stream uses the old unaligned coordinates; reject it. Odd picture
    dimensions remain valid and are handled by aligning the bayer allocation to
    2x2.
    
    Fixes: out of array write
    Fixes: fa6F4c0xA8el
    Fixes: 4f509c9e43 (ffv1dec: implement Bayer pixel format encoding)
    Found-by: Anonymous
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/ffv1dec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6677e5c8b4..0c0689c81f 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -583,6 +583,12 @@ static int read_header(FFV1Context *f, RangeCoder *c)
     if (ret < 0)
         return ret;
 
+    if (f->bayer && f->combined_version <= 0x40002) {
+        av_log(f->avctx, AV_LOG_ERROR,
+               "Bayer requires aligned slice coordinates (combined_version > 
0x40002)\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (f->configured_pix_fmt != f->pix_fmt ||
         f->configured_width != f->width ||
         f->configured_height != f->height ||

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

Reply via email to