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_vignette.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/vf_vignette.c') diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c index 181999327a..b5fed65511 100644 --- a/libavfilter/vf_vignette.c +++ b/libavfilter/vf_vignette.c @@ -239,7 +239,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } else { int plane; - for (plane = 0; plane < 4 && in->data[plane]; plane++) { + for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) { uint8_t *dst = out->data[plane]; const uint8_t *src = in ->data[plane]; const float *fmap = s->fmap; -- cgit v1.2.3