diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-16 22:20:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-26 18:37:12 +0100 |
commit | 48fb752767086a48e599f9e86d87096f66cc7590 (patch) | |
tree | 2af56055fe3410dd179c5dae2a2aaa9576dd88c4 /libavformat | |
parent | 29851cb840c176d514573914799ca6c95f3f4e8e (diff) | |
download | ffmpeg-48fb752767086a48e599f9e86d87096f66cc7590.tar.gz |
avformat/mvi: Use 64bit for testing dimensions
Fixes: signed integer overflow: 65535 * 65535 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-6649291124899840
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')
-rw-r--r-- | libavformat/mvi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mvi.c b/libavformat/mvi.c index 06c9cfe3f0..2d4b11aa32 100644 --- a/libavformat/mvi.c +++ b/libavformat/mvi.c @@ -94,7 +94,7 @@ static int read_header(AVFormatContext *s) vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; vst->codecpar->codec_id = AV_CODEC_ID_MOTIONPIXELS; - mvi->get_int = (vst->codecpar->width * vst->codecpar->height < (1 << 16)) ? avio_rl16 : avio_rl24; + mvi->get_int = (vst->codecpar->width * (int64_t)vst->codecpar->height < (1 << 16)) ? avio_rl16 : avio_rl24; mvi->audio_frame_size = ((uint64_t)mvi->audio_data_size << MVI_FRAC_BITS) / frames_count; if (mvi->audio_frame_size <= 1 << MVI_FRAC_BITS - 1) { |