aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-10 00:09:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-10 00:09:34 +0200
commita0d15027e3b0c7825cc10052363b72e9398578b9 (patch)
tree694ffbf9f85707800c9bdeaa5d1522327c3d8470
parent8f29901b5468f99f336900ae008d86d1f100188f (diff)
downloadffmpeg-a0d15027e3b0c7825cc10052363b72e9398578b9.tar.gz
yadif: check input video size.
yadif needs at least 3x3 or it will likely crash with out of array reads Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_yadif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index d25c7b11b4..f200cb1474 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -221,6 +221,11 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
av_assert0(picref);
+ if (picref->video->h < 3 || picref->video->w < 3) {
+ av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines is not supported\n");
+ return AVERROR(EINVAL);
+ }
+
if (yadif->frame_pending)
return_frame(ctx, 1);