diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-05-12 18:37:20 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-05-12 18:37:20 +0300 |
commit | 9cd62b2ca49be372b95e54202c0dac0de4f8a464 (patch) | |
tree | 3231a2b252c258110ceca307959e7b850e67b8b8 /libavfilter | |
parent | ccce2248bf56692fc7bd436ca2c9acca772d486a (diff) |
avfilter/vf_pad: revert part of 57c3670896c69714ca
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_pad.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 725dc29e96..ed155578e1 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -197,7 +197,10 @@ static int config_input(AVFilterLink *inlink) inlink->w, inlink->h, s->w, s->h, s->x, s->y, s->rgba_color[0], s->rgba_color[1], s->rgba_color[2], s->rgba_color[3]); - if (s->w <= 0 || s->h <= 0) { + if (s->x < 0 || s->y < 0 || + s->w <= 0 || s->h <= 0 || + (unsigned)s->x + (unsigned)inlink->w > s->w || + (unsigned)s->y + (unsigned)inlink->h > s->h) { av_log(ctx, AV_LOG_ERROR, "Input area %d:%d:%d:%d not within the padded area 0:0:%d:%d or zero-sized\n", s->x, s->y, s->x + inlink->w, s->y + inlink->h, s->w, s->h); |