avfilter/vf_datascope: fix heap buffer overflow

Fixes #8309

(cherry picked from commit d4d6b7b035)
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Paul B Mahol 2019-10-19 09:50:53 +02:00 committed by James Almer
parent d60effdf83
commit aef4cbec69
1 changed files with 1 additions and 1 deletions

View 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);