diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-19 16:54:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-09-13 10:40:02 +0200 |
commit | aa8935b395162f8438d1f055e671e92685ed1586 (patch) | |
tree | 9d84701c7460dae056a1fb8851a3fe8a4ffe056c /libavformat/cdg.c | |
parent | e3af2a07562c020c960f40bee00f9a78a8b9baf8 (diff) | |
download | ffmpeg-aa8935b395162f8438d1f055e671e92685ed1586.tar.gz |
avformat/cdg: Fix integer overflow in duration computation
Fixes: signed integer overflow: 8398407 * 300 cannot be represented in type 'int'
Fixes: 23914/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4702539290509312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/cdg.c')
-rw-r--r-- | libavformat/cdg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cdg.c b/libavformat/cdg.c index 05cac6e528..f933819d57 100644 --- a/libavformat/cdg.c +++ b/libavformat/cdg.c @@ -49,7 +49,7 @@ static int read_header(AVFormatContext *s) if (ret < 0) { av_log(s, AV_LOG_WARNING, "Cannot calculate duration as file size cannot be determined\n"); } else - vst->duration = (ret * vst->time_base.den) / (CDG_PACKET_SIZE * 300); + vst->duration = (ret * (int64_t)vst->time_base.den) / (CDG_PACKET_SIZE * 300); return 0; } |