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_delogo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/vf_delogo.c') diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 45a29cf00c..971e98670a 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -237,7 +237,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (!sar.num) sar.num = sar.den = 1; - for (plane = 0; plane < 4 && in->data[plane]; plane++) { + for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) { int hsub = plane == 1 || plane == 2 ? hsub0 : 0; int vsub = plane == 1 || plane == 2 ? vsub0 : 0; -- cgit v1.2.1