History

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

Michael Niedermayer committed 6 years ago

Commit 49ba1871 parent 64c59b61 file · +1 −1Browse files

Unified · Split

libswscale/output.c+1−1
@@ -2278,7 +2278,7 @@ yuv2gbrp16_full_X_c(SwsContext *c, const int16_t *lumFilter, · 2277 unmodified lines
2278 A = -0x40000000;2278 A = -0x40000000;
2279 2279
2280 for (j = 0; j < lumFilterSize; j++)2280 for (j = 0; j < lumFilterSize; j++)
2281 A += alpSrc[j][i] * lumFilter[j];2281 A += alpSrc[j][i] * (unsigned)lumFilter[j];
2282 2282
2283 A >>= 1;2283 A >>= 1;
2284 A += 0x20002000;2284 A += 0x20002000;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t