diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-29 10:58:31 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:54:16 +0300 |
commit | e6b5c7a5fccf7237b2aceb4334dec53f181e0149 (patch) | |
tree | de4b2f7c49c75af052e147e5cf3d49e41a7f463c /libavfilter | |
parent | cf876bdef8ba66c66518aa2192fff2975ad02d0b (diff) |
avfilter/vf_vmafmotion: Check dimensions
Fixes: out of array access
Fixes: Ticket8241
Fixes: Ticket8246
Fixes: CVE-2020-22019
Fixes: CVE-2020-22033
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 82ad1b76751bcfad5005440db48c46a4de5d6f02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_vmafmotion.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 5c2a974538..909d234b34 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -238,6 +238,9 @@ int ff_vmafmotion_init(VMAFMotionData *s, int i; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); + if (w < 3 || h < 3) + return AVERROR(EINVAL); + s->width = w; s->height = h; s->stride = FFALIGN(w * sizeof(uint16_t), 32); |