summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/setup.c
diff options
context:
space:
mode:
authorJason Wang <wangborong@cdjrlc.com>2021-12-20 09:46:02 +0100
committerMax Filippov <jcmvbkbc@gmail.com>2022-03-07 05:17:08 +0100
commitb8f9a9aa02bfbf3557bebed066e0523aad482878 (patch)
tree1f2c6a44510bb50b23766bbb58621b42969bfd81 /arch/xtensa/kernel/setup.c
parentLinux 5.17-rc7 (diff)
downloadlinux-b8f9a9aa02bfbf3557bebed066e0523aad482878.tar.xz
linux-b8f9a9aa02bfbf3557bebed066e0523aad482878.zip
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions