Browse Source

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>
tags/n3.4.5
Michael Niedermayer 7 years ago
parent
commit
007da8396f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/scpr.c

+ 3
- 0
libavcodec/scpr.c View File

@@ -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…
Cancel
Save