aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_scale_npp.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-06-11 14:56:44 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2017-06-13 19:47:44 +0200
commit0fbc9bbbbb39b9a6f62d57f237052b64eefac578 (patch)
treedb0aa7f0bd228232b50314f5c200004167783756 /libavfilter/vf_scale_npp.c
parent21583e936a06fa0c9dca99436c21d441d04e57f4 (diff)
downloadffmpeg-0fbc9bbbbb39b9a6f62d57f237052b64eefac578.tar.gz
avfilter/vf_scale_npp: fix out-of-bounds reads
Fixes CIDs 1396414 and 1396415
Diffstat (limited to 'libavfilter/vf_scale_npp.c')
-rw-r--r--libavfilter/vf_scale_npp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index b5acce653b..c36772e800 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -400,7 +400,7 @@ static int nppscale_resize(AVFilterContext *ctx, NPPScaleStageContext *stage,
NppStatus err;
int i;
- for (i = 0; i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) {
+ for (i = 0; i < FF_ARRAY_ELEMS(stage->planes_in) && i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) {
int iw = stage->planes_in[i].width;
int ih = stage->planes_in[i].height;
int ow = stage->planes_out[i].width;