From e43a0a232dbf6d3c161823c2e07c52e76227a1bc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 3 Aug 2013 18:54:43 +0200 Subject: avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer --- libavfilter/vf_fieldmatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/vf_fieldmatch.c') diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 3a6f806..89c4909 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -608,7 +608,7 @@ static void copy_fields(const FieldMatchContext *fm, AVFrame *dst, const AVFrame *src, int field) { int plane; - for (plane = 0; plane < 4 && src->data[plane]; plane++) + for (plane = 0; plane < 4 && src->data[plane] && src->linesize[plane]; plane++) av_image_copy_plane(dst->data[plane] + field*dst->linesize[plane], dst->linesize[plane] << 1, src->data[plane] + field*src->linesize[plane], src->linesize[plane] << 1, get_width(fm, src, plane), get_height(fm, src, plane) / 2); -- cgit v1.1