[FFmpeg-cvslog] avformat/utils: Fix integer overflow with complex time bases in avformat_find_stream_info()
Michael Niedermayer
git at videolan.org
Sun Feb 16 17:09:55 EET 2020
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb 15 23:23:55 2020 +0100| [f3d8f517dbc42de8e2f97cc01bf5171bb05fbcc7] | committer: Michael Niedermayer
avformat/utils: Fix integer overflow with complex time bases in avformat_find_stream_info()
Fixes: signed integer overflow: 2045163756 * 2 cannot be represented in type 'int'
Fixes: Ticket5132
Found-by: tsmith
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3d8f517dbc42de8e2f97cc01bf5171bb05fbcc7
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d5ad4ec4b0..123d67800b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4062,7 +4062,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!st->r_frame_rate.num) {
if ( avctx->time_base.den * (int64_t) st->time_base.num
- <= avctx->time_base.num * avctx->ticks_per_frame * (int64_t) st->time_base.den) {
+ <= avctx->time_base.num * avctx->ticks_per_frame * (uint64_t) st->time_base.den) {
av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den,
avctx->time_base.den, (int64_t)avctx->time_base.num * avctx->ticks_per_frame, INT_MAX);
} else {
More information about the ffmpeg-cvslog
mailing list