diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2023-08-20 05:28:08 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2023-08-20 05:36:23 +0000 |
commit | 79e6ffb6951bd75a92326fabadd48e87ee0aed96 (patch) | |
tree | a2a25149dedd3a62be53060d5287250ce3802ad4 | |
parent | 9a7add6d01f3c5f7eba811e794cf860d2bce131d (diff) | |
download | src-79e6ffb6951bd75a92326fabadd48e87ee0aed96.tar.gz src-79e6ffb6951bd75a92326fabadd48e87ee0aed96.zip |
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)")
-rw-r--r-- | contrib/netbsd-tests/lib/libc/gen/t_vis.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |