aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext_cuda.h
diff options
context:
space:
mode:
authorJeremy Dorfman <jdorfman@google.com>2022-11-15 14:30:23 -0500
committerMichael Niedermayer <michael@niedermayer.cc>2022-11-20 21:23:57 +0100
commitce566281f943227480b5441401e90ee8a843730f (patch)
tree9042f40b10549660100a00ac8ce1e9545b98aed1 /libavutil/hwcontext_cuda.h
parent0871cb9499242cb323c245599f3e7e763806e85b (diff)
downloadffmpeg-ce566281f943227480b5441401e90ee8a843730f.tar.gz
swscale/input: Use unsigned intermediates in rgb64ToUV_c_template
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>
Diffstat (limited to 'libavutil/hwcontext_cuda.h')
0 files changed, 0 insertions, 0 deletions