diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-15 16:31:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-05-04 20:00:05 +0200 |
commit | 724b8fa1e230419c866bb8bfa8a5b7a9ad6f6c42 (patch) | |
tree | 54d1f729986c31cd2a469f1e22799bce8e7bb3e0 /libavfilter | |
parent | 7eb02a1f8375362d7f65db14343a6eec20b255cb (diff) | |
download | ffmpeg-724b8fa1e230419c866bb8bfa8a5b7a9ad6f6c42.tar.gz |
avfilter/vf_avgblur: fix heap-buffer overflow
Fixes #8274
(cherry picked from commit f069a9c2a65bc20c3462127623127df6dfd06c5b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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; \ |