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>
This commit is contained in:
Andreas Rheinhardt 2021-10-03 10:03:44 +02:00
parent 0536c5a449
commit 806a91bd4c
1 changed files with 1 additions and 0 deletions

View File

@ -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;