[FFmpeg-devel] [PATCH 02/11] avfilter/vf_scale_npp: fix out-of-bounds reads
Timo Rothenpieler
timo at rothenpieler.org
Sun Jun 11 17:05:44 EEST 2017
Fixes CIDs 1396414 and 1396415
---
libavfilter/vf_scale_npp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.13.0
More information about the ffmpeg-devel
mailing list