[FFmpeg-cvslog] avfilter/vf_aspect: Fix integer overflow in compute_dar()

2020-04-23 Thread Michael Niedermayer
ffmpeg | branch: release/2.8 | Michael Niedermayer  | 
Sat Feb 15 22:35:37 2020 +0100| [9c151e45a8185f37f3bdbf8e567565a3e1df90e2] | 
committer: 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: Paul B Mahol 
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 0c0ca0f244b823238e5a4f5584168e620da84899)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c151e45a8185f37f3bdbf8e567565a3e1df90e2
---

 libavfilter/vf_aspect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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(>num, >den, sar.num * w, sar.den * h, INT_MAX);
+av_reduce(>num, >den, sar.num * (int64_t)w, sar.den * 
(int64_t)h, INT_MAX);
 } else {
 av_reduce(>num, >den, w, h, INT_MAX);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_aspect: Fix integer overflow in compute_dar()

2020-02-16 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Feb 15 22:35:37 2020 +0100| [0c0ca0f244b823238e5a4f5584168e620da84899] | 
committer: 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: Paul B Mahol 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c0ca0f244b823238e5a4f5584168e620da84899
---

 libavfilter/vf_aspect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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(>num, >den, sar.num * w, sar.den * h, INT_MAX);
+av_reduce(>num, >den, sar.num * (int64_t)w, sar.den * 
(int64_t)h, INT_MAX);
 } else {
 av_reduce(>num, >den, w, h, INT_MAX);
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".