Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-16 22:18:11 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 14:33:44 +0300
commit81f9e29bc9befca2c1bd86787a6a0e50c1ba17c6 (patch)
tree26d0f1ae41d51c707f822918e6a4ba8345323760 /libswscale
parente75f8b51ea2a49b03392a794bc7c6bd1704b7203 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index bb90e12c6b..70fb25c5e6 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2090,7 +2090,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;