mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
29851cb840
commit
48fb752767
@ -94,7 +94,7 @@ static int read_header(AVFormatContext *s)
|
|||||||
vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
|
vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||||
vst->codecpar->codec_id = AV_CODEC_ID_MOTIONPIXELS;
|
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;
|
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) {
|
if (mvi->audio_frame_size <= 1 << MVI_FRAC_BITS - 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user