mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/wavdec: satuarte next_tag_ofs, data_end
Fixes: signed integer overflow: 5053074104798691550 + 5053074104259715104 cannot be represented in type 'long'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6515315309936640
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 61dca9e150
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4db0eb4653
commit
3c37c0a7be
@ -444,7 +444,7 @@ static int wav_read_header(AVFormatContext *s)
|
||||
}
|
||||
|
||||
if (rf64 || bw64) {
|
||||
next_tag_ofs = wav->data_end = avio_tell(pb) + data_size;
|
||||
next_tag_ofs = wav->data_end = av_sat_add64(avio_tell(pb), data_size);
|
||||
} else if (size != 0xFFFFFFFF) {
|
||||
data_size = size;
|
||||
next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX;
|
||||
|
Loading…
Reference in New Issue
Block a user