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

Fixes: heap buffer overflow (write)
Fixes: ypfajWK7GTuH
Found-by: Zheng Yu @ Depthfirst



>From 884dfeebacdceafc8449228327898c50a30cd2d8 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Tue, 15 Sep 2026 06:14:14 +0200
Subject: [PATCH] avfilter/vf_tiltandshift: keep the initial black padding
 within the frame

Fixes: heap buffer overflow (write)
Fixes: ypfajWK7GTuH
Found-by: Zheng Yu @ Depthfirst
---
 libavfilter/vf_tiltandshift.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index f22f993bc5..cfe33d0116 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -197,7 +197,7 @@ static int output_frame(AVFilterLink *outlink)
 
     // in case we have to do any initial black padding
     if (s->start == TILT_BLACK) {
-        for ( ; ncol < s->hold; ncol++)
+        for ( ; ncol < FFMIN(s->hold, outlink->w); ncol++)
             copy_column(outlink, dst->data, dst->linesize,
                         (const uint8_t **)s->black_buffers, s->black_linesizes,
                         ncol, 0);
-- 
2.52.0

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

Reply via email to