]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_datascope: fix heap buffer overflow
authorPaul B Mahol <onemda@gmail.com>
Sat, 19 Oct 2019 07:50:53 +0000 (09:50 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 19 Oct 2019 07:50:53 +0000 (09:50 +0200)
Fixes #8309

libavfilter/vf_datascope.c

index c9039a60f65d2797b10ff03f498e699a10a10288..83f90f07ba98b5a84d27074f4474c935047ba28f 100644 (file)
@@ -973,7 +973,7 @@ static int oscilloscope_filter_frame(AVFilterLink *inlink, AVFrame *frame)
                        frame->width, frame->height,
                        s->ox, s->oy, s->width, s->height + 20 * s->statistics);
 
-    if (s->grid) {
+    if (s->grid && outlink->h >= 10) {
         ff_fill_rectangle(&s->draw, &s->gray, frame->data, frame->linesize,
                           s->ox, s->oy, s->width - 1, 1);