OpenCloudOS-Kernel/arch/xtensa/platforms/iss
Jason Wang b8f9a9aa02 net: xtensa: use strscpy to copy strings
The strlcpy should not be used because it doesn't limit the source
length. So that it will lead some potential bugs.

But the strscpy doesn't require reading memory from the src string
beyond the specified "count" bytes, and since the return value is
easier to error-check than strlcpy()'s. In addition, the implementation
is robust to the string changing out from underneath it, unlike the
current strlcpy() implementation.

Thus, replace strlcpy with strscpy.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Message-Id: <20211220084602.952091-1-wangborong@cdjrlc.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2022-03-06 20:17:08 -08:00
..
include/platform xtensa: ISS: add GDBIO implementation to semihosting interface 2021-04-04 15:39:04 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
console.c Xtensa updates for v5.15 2021-09-02 13:12:44 -07:00
network.c net: xtensa: use strscpy to copy strings 2022-03-06 20:17:08 -08:00
setup.c kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
simdisk.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00