diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-11-14 22:59:01 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-17 22:34:53 +0300 |
commit | ba06c753dd59916c60947e10ef7a6ca10560d5b1 (patch) | |
tree | 7eda0101624bdff720bce98ac23a0c08307db42b /libavformat/iff.c | |
parent | fe0ff3e1d2f1ee0aa010ce67629e2ffe2c00d39d (diff) |
avformat/iff: Check size before skip
Fixes: Infinite loop
Fixes: 27292/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5731168991051776
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 8b50e8bc2975fad85e0713e05940ee9ecb5e8a18)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r-- | libavformat/iff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index 0f04e4f51a..4f6bc3edda 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -251,6 +251,9 @@ static int parse_dsd_prop(AVFormatContext *s, AVStream *st, uint64_t eof) uint64_t size = avio_rb64(pb); uint64_t orig_pos = avio_tell(pb); + if (size >= INT64_MAX) + return AVERROR_INVALIDDATA; + switch(tag) { case MKTAG('A','B','S','S'): if (size < 8) |