aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_hflip.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-25 19:50:54 +0200
commit64d362fce718d5dfe108c147971ca9558f5bed24 (patch)
tree392cd1c23c25930d97202d2f988f9bd79aebfd55 /libavfilter/vf_hflip.c
parentc55a09a8b65f88d748daa885b4829019a081040c (diff)
downloadffmpeg-64d362fce718d5dfe108c147971ca9558f5bed24.tar.gz
avfilter: fix plane validity checks
Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e43a0a232dbf6d3c161823c2e07c52e76227a1bc) Conflicts: libavfilter/vf_delogo.c libavfilter/vf_fieldmatch.c libavfilter/vf_fieldorder.c libavfilter/vf_hflip.c libavfilter/vf_kerndeint.c libavfilter/vf_lut.c libavfilter/vf_pad.c libavfilter/vf_showinfo.c libavfilter/vf_vignette.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_hflip.c')
-rw-r--r--libavfilter/vf_hflip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index c3b92c25df..fc88fe2b65 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -90,7 +90,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
if (av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_PAL)
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
- for (plane = 0; plane < 4 && in->data[plane]; plane++) {
+ for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
step = flip->max_step[plane];
hsub = (plane == 1 || plane == 2) ? flip->hsub : 0;
vsub = (plane == 1 || plane == 2) ? flip->vsub : 0;