Browse Source

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 49ba1879ad)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4.8
Michael Niedermayer 6 years ago
parent
commit
d33f8f2871
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libswscale/output.c

+ 1
- 1
libswscale/output.c View File

@@ -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;


Loading…
Cancel
Save