[FFmpeg-cvslog] avfilter/vf_scale_npp: fix out-of-bounds reads

Timo Rothenpieler git at videolan.org
Tue Jun 13 20:52:56 EEST 2017


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sun Jun 11 14:56:44 2017 +0200| [0fbc9bbbbb39b9a6f62d57f237052b64eefac578] | committer: Timo Rothenpieler

avfilter/vf_scale_npp: fix out-of-bounds reads

Fixes CIDs 1396414 and 1396415

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0fbc9bbbbb39b9a6f62d57f237052b64eefac578
---

 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;



More information about the ffmpeg-cvslog mailing list