mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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 2a8fb3c2cc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
38c029131a
commit
90b99445fb
@ -529,10 +529,13 @@ static int config_props(AVFilterLink *outlink)
|
||||
outlink->w = scale->w;
|
||||
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_divisible_by);
|
||||
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
if (outlink->w > INT_MAX ||
|
||||
outlink->h > INT_MAX ||
|
||||
(outlink->h * inlink->w) > INT_MAX ||
|
||||
|
Loading…
Reference in New Issue
Block a user