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

Git pushed a commit to branch master
in repository ffmpeg.

commit a3b48784438132fc33ce1ada84baf160439a2694
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 18 15:52:20 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 19 03:51:55 2026 +0000

    avcodec/cfhd: reject the FrameIndex frame request when the context's 
dimensions or pixel format differ from the allocated buffers
    
    Fixes: out of array write
    Fixes: zPJ4SItf22cl
    Fixes: ANT-2026-JP43PTUO
    Found-by: Anthropic's OSS Scanner
    
    Out of array write Replicated through UnModified FFmpeg with ASAN
---
 libavcodec/cfhd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 8033fac69d..f3a4ce820e 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -695,6 +695,13 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic,
             s->coded_format = AV_PIX_FMT_NONE;
             got_buffer = 1;
         } else if (tag == FrameIndex && data == 1 && s->sample_type == 1 && 
s->frame_type == 2) {
+            if (avctx->coded_width  != s->a_width  ||
+                avctx->coded_height != s->a_height ||
+                avctx->pix_fmt      != s->a_format) {
+                av_log(avctx, AV_LOG_ERROR, "Frame parameters do not match the 
allocated buffers\n");
+                ret = AVERROR_INVALIDDATA;
+                goto end;
+            }
             pic->width = pic->height = 0;
 
             if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)

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