mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
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: 2f489a509e
("libc: fix some overflow scenarios in vis(3)")
This commit is contained in:
parent
9a7add6d01
commit
79e6ffb695
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue