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

Fixes: out of array access

Signed-off-by: Michael Niedermayer <[email protected]>


>From bb52b441ac936e9642bda89fbcd1154b08b1d356 Mon Sep 17 00:00:00 2001
From: Marius Momeu <[email protected]>
Date: Sat, 2 May 2026 15:02:54 +0200
Subject: [PATCH] avfilter/vf_kerndeint: Check for minimum height

Fixes: out of array access

Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_kerndeint.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index f37e6b05d3..490316e6b1 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -85,6 +85,12 @@ static int config_props(AVFilterLink *inlink)
 
     kerndeint->is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & 
AV_PIX_FMT_FLAG_RGB;
     kerndeint->vsub = desc->log2_chroma_h;
+    if (AV_CEIL_RSHIFT(inlink->h, kerndeint->vsub) < 4) {
+        av_log(inlink->dst, AV_LOG_ERROR,
+               "Input height %d is too small; minimum chroma plane height is 
4\n",
+               inlink->h);
+        return AVERROR(EINVAL);
+    }
 
     ret = av_image_alloc(kerndeint->tmp_data, kerndeint->tmp_linesize,
                          inlink->w, inlink->h, inlink->format, 16);
-- 
2.52.0

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

Reply via email to