Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-16 00:35:37 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 14:33:44 +0300
commit1bcbe5bc9bf030195cb2db287d00b0a4dfa6428b (patch)
tree7b7104e342ecf3cccde7a2a6b922de2c17cd5b40 /libavfilter
parent14ed91c1232bbf3eb25d7db7e50effdf960515fb (diff)
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>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_aspect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index c042698ef7..70e7fedc97 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -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);
}