Commit 0c0ca0f2 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_aspect: Fix integer overflow in compute_dar()

Fixes: signed integer overflow: 1562273630 * 17 cannot be represented in type 'int'
Fixes: Ticket8323

Found-by: Suhwan
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 96840e47
......@@ -78,7 +78,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
static inline void compute_dar(AVRational *dar, AVRational sar, int w, int h)
{
if (sar.num && sar.den) {
av_reduce(&dar->num, &dar->den, sar.num * w, sar.den * h, INT_MAX);
av_reduce(&dar->num, &dar->den, sar.num * (int64_t)w, sar.den * (int64_t)h, INT_MAX);
} else {
av_reduce(&dar->num, &dar->den, w, h, INT_MAX);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment