Browse Source

avcodec/mss3: Check for the rac stream being invalid in rac_normalize()

Fixes: out of array read
Fixes: 15982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSA1_fuzzer-5630676251967488

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 99a172f3f4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.16
Michael Niedermayer 6 years ago
parent
commit
b4530a6ac8
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/mss3.c

+ 4
- 0
libavcodec/mss3.c View File

@@ -298,6 +298,10 @@ static void rac_normalise(RangeCoder *c)
c->got_error = 1;
c->low = 1;
}
if (c->low > c->range) {
c->got_error = 1;
c->low = 1;
}
if (c->range >= RAC_BOTTOM)
return;
}


Loading…
Cancel
Save