Commit 3cc3cb66 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/integer: Fix integer overflow in av_mul_i()

Found-by: fate
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 203ccb87
......@@ -74,7 +74,7 @@ AVInteger av_mul_i(AVInteger a, AVInteger b){
if(a.v[i])
for(j=i; j<AV_INTEGER_SIZE && j-i<=nb; j++){
carry= (carry>>16) + out.v[j] + a.v[i]*b.v[j-i];
carry= (carry>>16) + out.v[j] + a.v[i]*(unsigned)b.v[j-i];
out.v[j]= carry;
}
}
......
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