diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-15 22:35:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | 24cd98ec4a88748c4a5085c735da876f77489f56 (patch) | |
tree | 4ce09e7083c88d8a0a40a425b0edd6e37f519d99 | |
parent | b503ec1ae14e9ec073abc668e12a046bf4d4090d (diff) | |
download | ffmpeg-24cd98ec4a88748c4a5085c735da876f77489f56.tar.gz |
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: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c0ca0f244b823238e5a4f5584168e620da84899)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavfilter/vf_aspect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index bf30824851..81a7e263d5 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -104,7 +104,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); } |