Skip to content

Commit

Permalink
tests/checkasm/sw_rgb: don't write random data past the end of the bu…
Browse files Browse the repository at this point in the history
…ffer

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

Signed-off-by: James Almer <[email protected]>
Signed-off-by: Ramiro Polla <[email protected]>
  • Loading branch information
jamrial authored and ramiropolla committed Oct 17, 2024
1 parent d2ed52d commit e1d1ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/checkasm/sw_rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit e1d1ba4

Please sign in to comment.