Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-27 23:20:52 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-17 22:34:53 +0300
commit3294678d1807eaa05384e2e6c035caa683bbd04c (patch)
treeffa60615e84f51ff66a9b9cccba127dc4e10aa25 /libavformat/iff.c
parent92a47b7a82ac6c0869e7e072fad1dc9bfd322357 (diff)
avformat/iff: Check data_size not overflowing int64
Fixes: Infinite loop Fixes: 25844/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5660803318153216 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> (cherry picked from commit 24352ca79207d3311ee544fcba908a64004763ef) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r--libavformat/iff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 8ea3b38ac6..55acc0a18d 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -384,6 +384,9 @@ static int iff_read_header(AVFormatContext *s)
data_size = iff->is_64bit ? avio_rb64(pb) : avio_rb32(pb);
orig_pos = avio_tell(pb);
+ if (data_size >= INT64_MAX)
+ return AVERROR_INVALIDDATA;
+
switch(chunk_id) {
case ID_VHDR:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;