Quoting Michael Niedermayer (2024-07-09 00:24:10) > Fixes: CID1513722 Operands don't affect result > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > --- > libavfilter/vf_scale.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c > index bf09196e10d..120ff473f2e 100644 > --- a/libavfilter/vf_scale.c > +++ b/libavfilter/vf_scale.c > @@ -645,10 +645,8 @@ static int config_props(AVFilterLink *outlink) > if (ret < 0) > goto fail; > > - if (outlink->w > INT_MAX || > - outlink->h > INT_MAX || > - (outlink->h * inlink->w) > INT_MAX || > - (outlink->w * inlink->h) > INT_MAX) > + if ((outlink->h * (int64_t)inlink->w) > INT_MAX || > + (outlink->w * (int64_t)inlink->h) > INT_MAX)
assumes int is smaller than 64bit -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".