ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | 
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 <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>

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

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to