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-11-14 22:59:01 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-10 17:04:26 +0300
commitd3606caee9215b3c2875f049c0a96d73913d10df (patch)
tree85a1aea5bdf17ef4252b57d5a5613f441ffc1b29 /libavformat/iff.c
parent2521c55a5426425d8ba7a975392c9f16efbbe03b (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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 5489aecabb..033228b0ec 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -259,6 +259,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)