]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: hp-bioscfg: Replace deprecated strncpy() with strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 25 Feb 2025 23:21:27 +0000 (00:21 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 3 Mar 2025 12:57:32 +0000 (14:57 +0200)
commitbaa18b6ed4200aff869e78f2650123572b6a9ad6
treec631c32627f9ede4a952816366188ad5b0f2f6a9
parent0b6d8f9d2df78116afb159df05bbccf13a51b758
platform/x86: hp-bioscfg: Replace deprecated strncpy() with strscpy()

Since kstrtol() requires a NUL-terminated string as input and strncpy()
is deprecated for NUL-terminated destination buffers, use strscpy()
instead.

Compile-tested only.

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/20250225232126.356274-2-thorsten.blum@linux.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c