summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_lut.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-03 18:54:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-03 19:15:46 +0200
commite43a0a232dbf6d3c161823c2e07c52e76227a1bc (patch)
tree6ccf4fedf12be91e9de6f73fee41d202612916b5 /libavfilter/vf_lut.c
parentbc4e7985628134496104e32f37f811aab4f68c55 (diff)
downloadffmpeg-streaming-e43a0a232dbf6d3c161823c2e07c52e76227a1bc.zip
ffmpeg-streaming-e43a0a232dbf6d3c161823c2e07c52e76227a1bc.tar.gz
avfilter: fix plane validity checks
Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_lut.c')
-rw-r--r--libavfilter/vf_lut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 68320d0..d2fd4a1 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -304,7 +304,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
} else {
/* planar */
- for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
int h = FF_CEIL_RSHIFT(inlink->h, vsub);
OpenPOWER on IntegriCloud