Commit b9c032eb authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snow: Fix runtime error: signed integer overflow: 1086573993 +…

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 781f88bb
...@@ -540,7 +540,8 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ ...@@ -540,7 +540,8 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
if(get_rac(c, state+0)) if(get_rac(c, state+0))
return 0; return 0;
else{ else{
int i, e, a; int i, e;
unsigned a;
e= 0; e= 0;
while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10 while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10
e++; e++;
......
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