mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
swscale/output: Fix undefined shifts
Fixes: da14e86d8462be6493eab16bc2d40f88/asan_heap-oob_204cfd2_528_cov_340150052_COMPRESS.BMP Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3a6df0b4bb
commit
bdcd36a4c8
@ -1709,8 +1709,8 @@ yuv2rgb_full_1_c_template(SwsContext *c, const int16_t *buf0,
|
||||
int A = 0; //init to silence warning
|
||||
for (i = 0; i < dstW; i++) {
|
||||
int Y = buf0[i] << 2;
|
||||
int U = (ubuf0[i] - (128<<7)) << 2;
|
||||
int V = (vbuf0[i] - (128<<7)) << 2;
|
||||
int U = (ubuf0[i] - (128<<7)) * 4;
|
||||
int V = (vbuf0[i] - (128<<7)) * 4;
|
||||
|
||||
if (hasAlpha) {
|
||||
A = (abuf0[i] + 64) >> 7;
|
||||
|
Loading…
Reference in New Issue
Block a user