1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00
freebsd/usr.bin/catman
Don Lewis 3694294ca5 Avoid Coverity NUL termination warning about strncpy() by using
memcpy() instead.  It's probably a bit more optimal in this case
anyway. [1]

The program logic leading up to the creation of the strncpy/memcpy
destination buffer is a bit hairy.  Add a call to assert() to make
it clear what is happening here and detect any potential buffer
overruns in the future.

Check a couple syscall error returns.  Ignore the EEXIST error from
link() to preserve existing behavior. [2] [3]

Reported by:	Coverity
CID:		1009659 [1], 1009349 [2], 1009350 [3]
2016-05-12 23:14:31 +00:00
..
catman.1
catman.c Avoid Coverity NUL termination warning about strncpy() by using 2016-05-12 23:14:31 +00:00
Makefile
Makefile.depend