diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-10-24 01:44:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-10-28 02:22:42 +0200 |
commit | 0e853b61e65c81f31da5707d40559815bfa39767 (patch) | |
tree | 999b5c633915c4373f3a872f894940b21efca966 | |
parent | 707ec3cfc00b227dcc2189cfdd51807f3cd45a92 (diff) | |
download | ffmpeg-0e853b61e65c81f31da5707d40559815bfa39767.tar.gz |
avutil/integer: Fix integer overflow in av_mul_i()
Found-by: fate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3cc3cb663bf3061e40356392d2f7638de6a479fe)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/integer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/integer.c b/libavutil/integer.c index 6d6855fa1b..ba4aa778c9 100644 --- a/libavutil/integer.c +++ b/libavutil/integer.c @@ -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; } } |