aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-12-15 18:37:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-12-16 21:06:47 +0100
commit99b2700f5bf887cf95316a2f9e8c1082b11982ba (patch)
tree30e84d7e2efea2a2bcc7313456e200fca42aeacf
parent9092e58c4469f5488f305fdb85e34e61bba7b04a (diff)
downloadffmpeg-99b2700f5bf887cf95316a2f9e8c1082b11982ba.tar.gz
avformat/mvdec: Use 64 bit in timestamp computation
Fixes: division by zero Fixes: 42198/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5054366405492736.fuzz Fixes: 42222/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-4561249331970048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
index 8b54a9ab04..5d184f20a4 100644
--- a/libavformat/mvdec.c
+++ b/libavformat/mvdec.c
@@ -381,7 +381,7 @@ static int mv_read_header(AVFormatContext *avctx)
avio_skip(pb, 8);
av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);
av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);
- timestamp += asize / (ast->codecpar->channels * bytes_per_sample);
+ timestamp += asize / (ast->codecpar->channels * (uint64_t)bytes_per_sample);
}
} else if (!version && avio_rb16(pb) == 3) {
avio_skip(pb, 4);