avfilter/vf_datascope: fix heap buffer overflow

Fixes #8309
This commit is contained in:
Paul B Mahol 2019-10-19 09:50:53 +02:00
parent ed78ca4123
commit d4d6b7b035
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);