avfilter/vf_tiltandshift: keep the initial black padding within the frame

Fixes: heap buffer overflow (write)
Fixes: ypfajWK7GTuH
Found-by: Zheng Yu @ Depthfirst
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-10-11 00:43:40 +00:00
1 parent 8d8c75f2b0
commit 87941e8765
1 file changed
+1 -1
+1 -1
View File
@@ -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);