mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/utils: Use 64bit earlier in r_frame_rate check
Fixes: signed integer overflow: 1406796319 * 2 cannot be represented in type 'int'
Fixes: 32777/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5632576913014784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 578633fc1a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
80937873d5
commit
3dd661bf7b
@ -4028,7 +4028,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 * (uint64_t) st->time_base.den) {
|
||||
<= avctx->time_base.num * (uint64_t)avctx->ticks_per_frame * 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user