From 79e6ffb6951bd75a92326fabadd48e87ee0aed96 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sun, 20 Aug 2023 00:28:08 -0500 Subject: netbsd-tests: libc: fix strvis(3) overflow tests These tests weren't run on x86 until CI grabbed them. It turns out, there's a sign extension bug that surfaces on x86 with char being a signed type. NetBSD unearthed this when they took and improved the patch, so just grab their solution until we get to merging in the latest version of the test. Reported by: CI (via ngie) Fixes: 2f489a509e61 ("libc: fix some overflow scenarios in vis(3)") --- contrib/netbsd-tests/lib/libc/gen/t_vis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/t_vis.c b/contrib/netbsd-tests/lib/libc/gen/t_vis.c index 80800bf8b31f..8d0e7a50b329 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_vis.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_vis.c @@ -176,7 +176,7 @@ ATF_TC_BODY(strvis_locale, tc) #endif /* VIS_NOLOCALE */ #ifdef __FreeBSD__ -#define STRVIS_OVERFLOW_MARKER 0xff /* Arbitrary */ +#define STRVIS_OVERFLOW_MARKER ((char)0xff) /* Arbitrary */ ATF_TC(strvis_overflow_mb); ATF_TC_HEAD(strvis_overflow_mb, tc) -- cgit v1.2.3