summaryrefslogtreecommitdiffstats
path: root/drivers/misc/ti-st/st_kim.c
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-09-27 05:52:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-05 13:34:04 +0200
commit2801badd26540ecc9c93f6007e2d6e5030246d76 (patch)
tree7242b6e7680deb6def7aaf18baac92dc43bad586 /drivers/misc/ti-st/st_kim.c
parentbd4da04c79346cc7e6b2d4e158adb7d2a4bac53b (diff)
downloadlinux-stable-2801badd26540ecc9c93f6007e2d6e5030246d76.tar.gz
linux-stable-2801badd26540ecc9c93f6007e2d6e5030246d76.tar.bz2
linux-stable-2801badd26540ecc9c93f6007e2d6e5030246d76.zip
ibmvmc: replace deprecated strncpy with strscpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230927-strncpy-drivers-misc-ibmvmc-c-v1-1-29f56cd3a269@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/ti-st/st_kim.c')
0 files changed, 0 insertions, 0 deletions