mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/scpr: Check for min > max in decompress_p()
Fixes: Timeout
Fixes: 9342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4795990841229312
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 3378194ce8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
298ca73ab1
commit
907699d120
@ -522,6 +522,9 @@ static int decompress_p(AVCodecContext *avctx,
|
||||
return ret;
|
||||
|
||||
max += temp << 8;
|
||||
if (min > max)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
memset(s->blocks, 0, sizeof(*s->blocks) * s->nbcount);
|
||||
|
||||
while (min <= max) {
|
||||
|
Loading…
Reference in New Issue
Block a user