mirror of https://github.com/FFmpeg/FFmpeg.git
Large rgb2yuv tables and high pixel values cause the intermediate int32_t of ru*r + gu*g + bu*b to exceed INT_MAX, which is undefined behavior. This causes libswscale built with LLVM -fsanitize=undefined to assert. Using unsigned integers instead has defined behavior and produces identical results, and makes rgb64ToUV_c_template match rgb64ToY_c_template. Fixes: signed integer overflow Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>pull/388/head
parent
0871cb9499
commit
ce566281f9
1 changed files with 3 additions and 3 deletions
Loading…
Reference in new issue