Commit f069a9c2 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_avgblur: fix heap-buffer overflow

Fixes #8274
parent 62f47225
......@@ -148,7 +148,7 @@ static int filter_vertically_##name(AVFilterContext *ctx, void *arg, int jobnr,
\
src = s->buffer + x; \
ptr = buffer + x; \
for (i = 0; i <= radius; i++) { \
for (i = 0; i + radius < height && i <= radius; i++) { \
acc += src[(i + radius) * width]; \
count++; \
ptr[i * linesize] = acc / count; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment