linux/arch/nios2
Azeem Shaikh 6a22e017f9 nios2: Replace all non-returning strlcpy with strscpy
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2023-06-13 16:51:49 -05:00
..
boot nios2: add FORCE for vmlinuz.gz 2022-11-27 08:28:41 +09:00
configs treewide: defconfig: address renamed CONFIG_DEBUG_INFO=y 2022-09-11 21:55:05 -07:00
include nios2: Convert __pte_free_tlb() to use ptdescs 2023-06-13 16:51:49 -05:00
kernel nios2: Replace all non-returning strlcpy with strscpy 2023-06-13 16:51:49 -05:00
lib
mm nios2: fix livelock in uaccess 2023-03-02 12:32:35 -05:00
platform nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-10-27 09:29:07 -05:00
Kbuild nios2: move core-y in arch/nios2/Makefile to arch/nios2/Kbuild 2022-09-29 04:40:14 +09:00
Kconfig nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER 2023-04-18 16:29:45 -07:00
Kconfig.debug NIOS2: fix kconfig unmet dependency warning for SERIAL_CORE_CONSOLE 2021-09-24 08:49:39 -05:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00