Commit 99a172f3 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2cb1f797
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment