]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/log.c: Replace strncpy(3) call by STRTCPY()
authorAlejandro Colomar <alx@kernel.org>
Wed, 15 Nov 2023 23:08:47 +0000 (00:08 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sun, 26 Nov 2023 12:48:18 +0000 (06:48 -0600)
commit81f0e6a30fe27cc20a8a65e1d74eee589e548bb8
tree6d4e95ec393663e4bbc6e64d1f8332e3616578ca
parent09957c6d273a7b4c1e85f623ed41633f343be88a
lib/log.c: Replace strncpy(3) call by STRTCPY()

This call was too clever.  It relied on the last byte of ll_line
being 0 due to a previous memzero() and not writing to it later.
Write an explicit terminating null byte, by using STRTCPY().

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/log.c