diff mbox

[FFmpeg-devel] avfilter/vf_bwdif: fix heap-buffer overflow

Message ID 20191013212238.31427-1-onemda@gmail.com
State Accepted
Commit 8c3166e1c302c3ba80d9742ae46161c0fa8e2606
Headers show

Commit Message

Paul B Mahol Oct. 13, 2019, 9:22 p.m. UTC
Fixes #8261

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavfilter/vf_bwdif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Mundt Oct. 14, 2019, 9:17 a.m. UTC | #1
Am So., 13. Okt. 2019 um 23:22 Uhr schrieb Paul B Mahol <onemda@gmail.com>:

> Fixes #8261
>
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavfilter/vf_bwdif.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
> index 37165584cf..b6aed7a450 100644
> --- a/libavfilter/vf_bwdif.c
> +++ b/libavfilter/vf_bwdif.c
> @@ -343,8 +343,8 @@ static int config_props(AVFilterLink *link)
>      if(yadif->mode&1)
>          link->frame_rate = av_mul_q(link->src->inputs[0]->frame_rate,
> (AVRational){2,1});
>
> -    if (link->w < 3 || link->h < 3) {
> -        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines
> is not supported\n");
> +    if (link->w < 3 || link->h < 4) {
> +        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4
> lines is not supported\n");
>          return AVERROR(EINVAL);
>      }


lgtm, thanks.

Regards,
Thomas
diff mbox

Patch

diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
index 37165584cf..b6aed7a450 100644
--- a/libavfilter/vf_bwdif.c
+++ b/libavfilter/vf_bwdif.c
@@ -343,8 +343,8 @@  static int config_props(AVFilterLink *link)
     if(yadif->mode&1)
         link->frame_rate = av_mul_q(link->src->inputs[0]->frame_rate, (AVRational){2,1});
 
-    if (link->w < 3 || link->h < 3) {
-        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines is not supported\n");
+    if (link->w < 3 || link->h < 4) {
+        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4 lines is not supported\n");
         return AVERROR(EINVAL);
     }