Commit 0fbc9bbb authored by Timo Rothenpieler's avatar Timo Rothenpieler

avfilter/vf_scale_npp: fix out-of-bounds reads

Fixes CIDs 1396414 and 1396415
parent 21583e93
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment