avfilter/vf_scale_npp: fix out-of-bounds reads

Fixes CIDs 1396414 and 1396415
pull/262/head
Timo Rothenpieler 8 years ago
parent 21583e936a
commit 0fbc9bbbbb
  1. 2
      libavfilter/vf_scale_npp.c

@ -400,7 +400,7 @@ static int nppscale_resize(AVFilterContext *ctx, NPPScaleStageContext *stage,
NppStatus err; NppStatus err;
int i; 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 iw = stage->planes_in[i].width;
int ih = stage->planes_in[i].height; int ih = stage->planes_in[i].height;
int ow = stage->planes_out[i].width; int ow = stage->planes_out[i].width;

Loading…
Cancel
Save