diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-03 20:54:43 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-03 21:15:46 +0400 |
commit | e43a0a232dbf6d3c161823c2e07c52e76227a1bc (patch) | |
tree | 6ccf4fedf12be91e9de6f73fee41d202612916b5 /libavfilter/vf_boxblur.c | |
parent | bc4e7985628134496104e32f37f811aab4f68c55 (diff) |
avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_boxblur.c')
-rw-r--r-- | libavfilter/vf_boxblur.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index 8a59890452..bf4c42e674 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -313,13 +313,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } av_frame_copy_props(out, in); - for (plane = 0; in->data[plane] && plane < 4; plane++) + for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) hblur(out->data[plane], out->linesize[plane], in ->data[plane], in ->linesize[plane], w[plane], h[plane], s->radius[plane], s->power[plane], s->temp); - for (plane = 0; in->data[plane] && plane < 4; plane++) + for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) vblur(out->data[plane], out->linesize[plane], out->data[plane], out->linesize[plane], w[plane], h[plane], s->radius[plane], s->power[plane], |