PR #24685 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24685
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24685.patch

This is the pixel format counterpart of 056a4ae771.

Fixes: heap-buffer-overflow (write)
Fixes: A2S4stAxqn2e
Fixes: ANT-2026-8P9BWDVL-cfhd-threads2.avi
Fixes: ANT-2026-8P9BWDVL-cfhd-threads16.avi
Found-by: Claude and Ada Logics



>From df7490f07d19883c67f7accf7025e1bd78578f8c Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Thu, 24 Sep 2026 22:01:45 +0200
Subject: [PATCH] avcodec/cfhd: set the pixel format unconditionally

This is the pixel format counterpart of 056a4ae771.

Fixes: heap-buffer-overflow (write)
Fixes: A2S4stAxqn2e
Fixes: ANT-2026-8P9BWDVL-cfhd-threads2.avi
Fixes: ANT-2026-8P9BWDVL-cfhd-threads16.avi
Found-by: Claude and Ada Logics
---
 libavcodec/cfhd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index e91788d4a8..28ec749cba 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -678,6 +678,7 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic,
             ret = ff_set_dimensions(avctx, s->coded_width, s->coded_height);
             if (ret < 0)
                 return ret;
+            avctx->pix_fmt = s->coded_format;
             if (s->cropped_height) {
                 unsigned height = s->cropped_height << (avctx->pix_fmt == 
AV_PIX_FMT_BAYER_RGGB16);
                 if (avctx->height < height)
-- 
2.52.0

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

Reply via email to