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>
release/6.1
Michael Niedermayer 6 months ago
parent 38c029131a
commit 90b99445fb
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 5
      libavfilter/vf_scale.c

@ -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…
Cancel
Save