]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/utmp.c: get_current_utmp(): Use simple assignment instead of memcpy(3)
authorAlejandro Colomar <alx@kernel.org>
Wed, 10 Dec 2025 14:21:15 +0000 (15:21 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Tue, 17 Feb 2026 09:45:39 +0000 (10:45 +0100)
commitf754f6e0605abd0b912602452ab94cbe4fd2f10c
tree527c817ff70b81de7f6f04e0e40af9a36278cf81
parent4b3f657aa3e16b34b7a04a39999745dbd4c98863
lib/utmp.c: get_current_utmp(): Use simple assignment instead of memcpy(3)

memcpy(3) is overkill, and much more dangerous than simple assignment.
Simple assignment adds type safety, and removes any possibility of
buffer overflow due to accidentally specifying a wrong size.

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