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

Michael Niedermayer michael at niedermayer.cc
Wed Jul 10 19:09:36 EEST 2024


On Tue, Jul 09, 2024 at 05:41:32PM -0400, Sean McGovern wrote:
> For even small values of 'asrc[x]', 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 uint32_t.
> ---
>  libswscale/yuv2rgb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240710/edd771db/attachment.sig>


More information about the ffmpeg-devel mailing list