1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00
freebsd/lib/libc/tests
Robert Clausecker 61ed5748e4 lib/libc/tests/string: improve memccpy "bounds" unit test
The purpose of the "bounds" test is to check that the function does not
overread the array bounds.  The old unit test, copied from the strlcpy()
one, always ensured that we see the character c memccpy() is looking for
in the source array before the array ends.  While this is correct for
strlcpy(), memccpy()'s specification does not guarantee that c is
present within the given size limit.

The updated test handles this case better, ensuring that the source
array ends early if c is not supposed to be present.

Reported by:	getz
Approved by:	emaste
See also:	D46052
Event:		GSoC 2024
Differential Revision:	https://reviews.freebsd.org/D46051
2024-09-14 20:42:19 +02:00
..
c063 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
db Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gen Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
hash Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
inet Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
locale Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
net Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nss Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
regex Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
resolv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
secure include: ssp: fortify <sys/socket.h> 2024-07-13 00:16:26 -05:00
setjmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ssp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
stdio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
stdlib libc tests: Add some test cases for recursive exiting 2024-08-07 16:06:11 +00:00
string lib/libc/tests/string: improve memccpy "bounds" unit test 2024-09-14 20:42:19 +02:00
sys Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
termios Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
time Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tls Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tls_dso Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ttyio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend
Makefile.netbsd-tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00