diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-16 20:18:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-04 22:09:46 +0200 |
commit | 49ba1879add99d3f64d70d34fb0255c8a49d4b28 (patch) | |
tree | fd77a37dd75647c848e24b4168c42a18096e98dd /libswscale | |
parent | 64c59b626fa1cfd92703e99b85acc516d0d8ba0b (diff) | |
download | ffmpeg-49ba1879add99d3f64d70d34fb0255c8a49d4b28.tar.gz |
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>
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 a793a89443..9df6ba44c8 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2278,7 +2278,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; |