[FFmpeg-cvslog] avfilter/vf_gblur: fix heap-buffer overflow

Paul B Mahol git at videolan.org
Mon Apr 18 19:05:44 EEST 2022


ffmpeg | branch: release/3.2 | Paul B Mahol <onemda at gmail.com> | Wed Oct 16 12:13:04 2019 +0200| [f8b4426c10aa65f4c04847a50ebfdcb8782a49b7] | committer: Michael Niedermayer

avfilter/vf_gblur: fix heap-buffer overflow

Fixes #8282

(cherry picked from commit 64a805883d7223c868a683f0030837d859edd2ab)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8b4426c10aa65f4c04847a50ebfdcb8782a49b7
---

 libavfilter/vf_gblur.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
index 27b702998e..f640b506d3 100644
--- a/libavfilter/vf_gblur.c
+++ b/libavfilter/vf_gblur.c
@@ -222,7 +222,7 @@ static int config_input(AVFilterLink *inlink)
 
     s->nb_planes = av_pix_fmt_count_planes(inlink->format);
 
-    s->buffer = av_malloc_array(inlink->w, inlink->h * sizeof(*s->buffer));
+    s->buffer = av_malloc_array(FFALIGN(inlink->w, 16), FFALIGN(inlink->h, 16) * sizeof(*s->buffer));
     if (!s->buffer)
         return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list