avfilter/vf_scale: Check ff_scale_adjust_dimensions() for failure
Helps: CID1513722 Operands don't affect result Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2a8fb3c2cc07e741bca556eee8aea704fda4c33f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a579bc48ec
commit
d63a35fcf1
@ -494,10 +494,13 @@ static int config_props(AVFilterLink *outlink)
|
|||||||
outlink->w = scale->w;
|
outlink->w = scale->w;
|
||||||
outlink->h = scale->h;
|
outlink->h = scale->h;
|
||||||
|
|
||||||
ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h,
|
ret = ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h,
|
||||||
scale->force_original_aspect_ratio,
|
scale->force_original_aspect_ratio,
|
||||||
scale->force_divisible_by);
|
scale->force_divisible_by);
|
||||||
|
|
||||||
|
if (ret < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
if (outlink->w > INT_MAX ||
|
if (outlink->w > INT_MAX ||
|
||||||
outlink->h > INT_MAX ||
|
outlink->h > INT_MAX ||
|
||||||
(outlink->h * inlink->w) > INT_MAX ||
|
(outlink->h * inlink->w) > INT_MAX ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user