diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-15 16:31:15 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-09-13 16:49:13 -0300 |
commit | 01f3824f6c46ef19025059752a4381daa2443097 (patch) | |
tree | 747622bed326227e21bca5898e190724516d9092 /libavfilter | |
parent | fbb83f3d413fa33cd543015856b0171d0bd7de11 (diff) | |
download | ffmpeg-01f3824f6c46ef19025059752a4381daa2443097.tar.gz |
avfilter/vf_avgblur: fix heap-buffer overflow
Fixes #8274
(cherry picked from commit f069a9c2a65bc20c3462127623127df6dfd06c5b)
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_avgblur.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index c7b88427fd..b813237258 100644 --- a/libavfilter/vf_avgblur.c +++ b/libavfilter/vf_avgblur.c @@ -149,7 +149,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; \ |