You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -221,6 +221,11 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
|
|||||||
|
|
||||||
av_assert0(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)
|
if (yadif->frame_pending)
|
||||||
return_frame(ctx, 1);
|
return_frame(ctx, 1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user