diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-03 10:03:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-04 17:27:50 +0200 |
commit | 806a91bd4c40ae8ed7c345dc320d6c111e8f3328 (patch) | |
tree | a1b7f278965cbdc9a36c679af9e05cd126c9f53f | |
parent | 0536c5a449e5c9447d5042109b0b963d98e00596 (diff) |
avfilter/vf_morpho: Take pre-padding into account for LUT-reallocation
Fixes heap-buffer underflows.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/vf_morpho.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |