Re: [FFmpeg-devel] [PATCHv3] swscale: prevent undefined behaviour in the PUTRGBA macro

2024-07-09 Thread Leo Izen
On 7/9/24 2:34 PM, Sean McGovern wrote: For even small values of 'asrc', shifting them by 24 bits or more will cause arithmetic overflow and be caught by GCC's undefined behaviour sanitizer. Ensure the values do not overflow by up-casting the bracketed expressions involving 'asrc' to int32_t. --

[FFmpeg-devel] [PATCHv3] swscale: prevent undefined behaviour in the PUTRGBA macro

2024-07-09 Thread Sean McGovern
For even small values of 'asrc', shifting them by 24 bits or more will cause arithmetic overflow and be caught by GCC's undefined behaviour sanitizer. Ensure the values do not overflow by up-casting the bracketed expressions involving 'asrc' to int32_t. --- libswscale/yuv2rgb.c | 4 ++-- 1 file c