summaryrefslogtreecommitdiffstats
path: root/libavcodec/mss3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-04 09:33:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-08-05 17:50:27 +0200
commit99a172f3f4d0bef024c6293f575caaaddce0b267 (patch)
treea6407e87966f202273709b3c4f49d1f80e5203d5 /libavcodec/mss3.c
parent2cb1f797350875ec45cb20d59dc0684fcbac20fc (diff)
downloadffmpeg-streaming-99a172f3f4d0bef024c6293f575caaaddce0b267.zip
ffmpeg-streaming-99a172f3f4d0bef024c6293f575caaaddce0b267.tar.gz
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>
Diffstat (limited to 'libavcodec/mss3.c')
-rw-r--r--libavcodec/mss3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c
index 21226f9..02bd360 100644
--- a/libavcodec/mss3.c
+++ b/libavcodec/mss3.c
@@ -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;
}
OpenPOWER on IntegriCloud