1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2020-02-16 20:18:11 +01:00
parent 64c59b626f
commit 49ba1879ad

View File

@ -2278,7 +2278,7 @@ yuv2gbrp16_full_X_c(SwsContext *c, const int16_t *lumFilter,
A = -0x40000000; A = -0x40000000;
for (j = 0; j < lumFilterSize; j++) for (j = 0; j < lumFilterSize; j++)
A += alpSrc[j][i] * lumFilter[j]; A += alpSrc[j][i] * (unsigned)lumFilter[j];
A >>= 1; A >>= 1;
A += 0x20002000; A += 0x20002000;