aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/snow.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 17:12:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-28 17:13:07 +0200
commitb9c032ebc0ad17ac0ffefb915ff96baf9d79cab1 (patch)
treebc29bf0f0b3a905aa800c349b73918bb309b4879 /libavcodec/snow.h
parent781f88bb26534ececc76eaa972f02536ba2f0f55 (diff)
downloadffmpeg-b9c032ebc0ad17ac0ffefb915ff96baf9d79cab1.tar.gz
avcodec/snow: Fix runtime error: signed integer overflow: 1086573993 + 1086573994 cannot be represented in type 'int'
Fixes: 1871/clusterfuzz-testcase-minimized-5719950331215872 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/snow.h')
-rw-r--r--libavcodec/snow.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index 59c710b5f9..f7ed1f82e7 100644
--- a/libavcodec/snow.h
+++ b/libavcodec/snow.h
@@ -540,7 +540,8 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
if(get_rac(c, state+0))
return 0;
else{
- int i, e, a;
+ int i, e;
+ unsigned a;
e= 0;
while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10
e++;