diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4582fb59b7..53e02d8748 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -4085,7 +4085,7 @@ static int64_t webm_dash_manifest_compute_bandwidth(AVFormatContext *s, int64_t int64_t desc_bytes = desc_end.end_offset - desc_beg.start_offset; int64_t desc_ns = desc_end.end_time_ns - desc_beg.start_time_ns; double desc_sec, calc_bits_per_second, percent, mod_bits_per_second; - if (desc_bytes <= 0) + if (desc_bytes <= 0 || desc_bytes > INT64_MAX/8) return -1; desc_sec = desc_ns / nano_seconds_per_second;