]> www.infradead.org Git - users/jedix/linux-maple.git/commit
module: Replace deprecated strncpy() with strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 7 Mar 2025 11:35:47 +0000 (12:35 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Mon, 10 Mar 2025 10:56:03 +0000 (11:56 +0100)
commit6380bf8ff90213282a7a7f99697964a9c2bd6899
tree4da11d229e256f44768e85be788bf052657fabf5
parent3690f4a86005b4b15fabc606d2bbf39bb6290aff
module: Replace deprecated strncpy() with strscpy()

strncpy() is deprecated for NUL-terminated destination buffers; use
strscpy() instead. The destination buffer ownername is only used with
"%s" format strings and must therefore be NUL-terminated, but not NUL-
padded.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250307113546.112237-2-thorsten.blum@linux.dev
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
kernel/module/main.c