mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/dsicinvideo: Fail if there is only a small fraction of the data available that comprises a full frame
Fixes: Timeout
Fixes: 6306/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5079253549842432
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 5549488bbf
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a8640c87a7
commit
3bf0a405f0
@ -158,6 +158,9 @@ static int cin_decode_lzss(const unsigned char *src, int src_size,
|
||||
}
|
||||
}
|
||||
|
||||
if (dst_end - dst > dst_size - dst_size/10)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -184,6 +187,10 @@ static int cin_decode_rle(const unsigned char *src, int src_size,
|
||||
}
|
||||
dst += len;
|
||||
}
|
||||
|
||||
if (dst_end - dst > dst_size - dst_size/10)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user