]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/string/: Fortify source of strtcpy(), stpecpy(), and zustr2stp()
authorAlejandro Colomar <alx@kernel.org>
Fri, 24 Nov 2023 22:56:17 +0000 (23:56 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 4 Dec 2023 04:24:29 +0000 (22:24 -0600)
commitfc8389331e7482f084c488924b29b79f69ac3bd3
treed1c17004130e25f6a2c0f80a0e7223a03a96705f
parent72060a2b2bdede62fd5874f10d523379a4dbdcc4
lib/string/: Fortify source of strtcpy(), stpecpy(), and zustr2stp()

By writing the terminating null byte via stpcpy(3), we take advantage of
_FORTIFY_SOURCE for the last byte, which was unprotected before this
commit.

Reported-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/string/stpecpy.h
lib/string/strtcpy.h
lib/string/zustr2stp.h