aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-06 19:07:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-20 03:41:33 +0200
commitafbe970534ebeab60f373f91a6e576c92c98c5a2 (patch)
treef4c99ca25c5a63f9b77a6c0af63421f3d06fa580
parentb9289fad4b0b132ccb4ec71543a79240016ecd6a (diff)
downloadffmpeg-afbe970534ebeab60f373f91a6e576c92c98c5a2.tar.gz
avcodec/mss3: Change types in rac_get_model_sym() to match the types they are initialized from
Fixes integer overflow Fixes: 1372/clusterfuzz-testcase-minimized-5712192982745088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2ef0f392711445e173a56b2c073dedb021ae3783) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mss3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c
index 01941967a5..8344bfe8a7 100644
--- a/libavcodec/mss3.c
+++ b/libavcodec/mss3.c
@@ -356,8 +356,9 @@ static int rac_get_model2_sym(RangeCoder *c, Model2 *m)
static int rac_get_model_sym(RangeCoder *c, Model *m)
{
- int prob, prob2, helper, val;
+ int val;
int end, end2;
+ unsigned prob, prob2, helper;
prob = 0;
prob2 = c->range;