[FFmpeg-cvslog] avfilter/vf_morpho: Take pre-padding into account for LUT-reallocation

Andreas Rheinhardt git at videolan.org
Mon Oct 4 18:36:52 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Oct  3 10:03:44 2021 +0200| [806a91bd4c40ae8ed7c345dc320d6c111e8f3328] | committer: Andreas Rheinhardt

avfilter/vf_morpho: Take pre-padding into account for LUT-reallocation

Fixes heap-buffer underflows.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavfilter/vf_morpho.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_morpho.c b/libavfilter/vf_morpho.c
index ea8a0c065e..04b1580025 100644
--- a/libavfilter/vf_morpho.c
+++ b/libavfilter/vf_morpho.c
@@ -320,6 +320,7 @@ static int alloc_lut_if_necessary(LUT *Ty, IPlane *f, chord_set *SE,
 {
     if (Ty->I != SE->Lnum ||
         Ty->X != f->w ||
+        SE->minX < 0 && -SE->minX > Ty->pre_pad_x ||
         Ty->min_r != SE->minY ||
         Ty->max_r != SE->maxY + num - 1) {
         int ret;



More information about the ffmpeg-cvslog mailing list