diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-16 22:18:11 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-02 20:55:09 +0300 |
commit | d33f8f2871d6d3ecdc589cf72a75e04715cc5e33 (patch) | |
tree | 1a255644232af17f32a7e4f01321db382f3ee2cb /libswscale | |
parent | 1e61cc5c51357f30f3e5ddcf69868b68afccc407 (diff) |
swscale/output: Fix integer overflow in alpha computation in yuv2gbrp16_full_X_c()
Fixes: signed integer overflow: 524280 * 4432 cannot be represented in type 'int'
Fixes: ticket8322
Found-by: Suhwan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 49ba1879add99d3f64d70d34fb0255c8a49d4b28)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index c1d07b427d..6660b14994 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2062,7 +2062,7 @@ yuv2gbrp16_full_X_c(SwsContext *c, const int16_t *lumFilter, A = -0x40000000; for (j = 0; j < lumFilterSize; j++) - A += alpSrc[j][i] * lumFilter[j]; + A += alpSrc[j][i] * (unsigned)lumFilter[j]; A >>= 1; A += 0x20002000; |