aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_vignette.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-09 13:53:14 +0200
commit1bf2461765c58aad5829ea45a2885d11f50b73f0 (patch)
tree29a0b731a345a9ec6d19de775dfdee54e955e05d /libavfilter/vf_vignette.c
parent64444cd5784b2584b1c768154c55491389ebb3ac (diff)
downloadffmpeg-1bf2461765c58aad5829ea45a2885d11f50b73f0.tar.gz
avfilter: fix plane validity checks
Fixes out of array accesses (cherry picked from commit e43a0a232dbf6d3c161823c2e07c52e76227a1bc) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_vignette.c')
-rw-r--r--libavfilter/vf_vignette.c2
1 files changed, 1 insertions, 1 deletions
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;