tests/checkasm/sw_rgb: don't write random data past the end of the buffer

Should fix fate-checkasm-sw_rgb under gcc-ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>
This commit is contained in:
James Almer 2024-09-11 13:37:10 -03:00 committed by Ramiro Polla
parent d2ed52dc02
commit e1d1ba4cbc

View File

@ -287,7 +287,7 @@ static void check_deinterleave_bytes(void)
int width, int height, int srcStride,
int dst1Stride, int dst2Stride);
randomize_buffers(src, 2*MAX_STRIDE*MAX_HEIGHT+2);
randomize_buffers(src, 2*MAX_STRIDE*MAX_HEIGHT);
if (check_func(deinterleaveBytes, "deinterleave_bytes")) {
for (int i = 0; i <= 16; i++) {