1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avformat/wavdec: Use 64bit in new_pos computation

Fixes: signed integer overflow: 129 * 16711680 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6742285317439488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9b57d2f0a9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-04-27 20:57:02 +02:00
parent fa2982c034
commit e129464be8

View File

@ -540,7 +540,7 @@ smv_retry:
if (wav->smv_last_stream) {
uint64_t old_pos = avio_tell(s->pb);
uint64_t new_pos = wav->smv_data_ofs +
wav->smv_block * wav->smv_block_size;
wav->smv_block * (int64_t)wav->smv_block_size;
if (avio_seek(s->pb, new_pos, SEEK_SET) < 0) {
ret = AVERROR_EOF;
goto smv_out;