summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-08-12 00:56:15 +0300
committerHeiko Carstens <hca@linux.ibm.com>2023-08-18 16:08:12 +0300
commitcfd012107f11ec4af010f11eca341edc831abf6c (patch)
tree23e77634348c056f784a92f53e0cb1ce836fe7f9 /tools/perf/scripts/python
parent979fe44af819d76fc02a5a97ad1cb74f7d83578e (diff)
downloadlinux-cfd012107f11ec4af010f11eca341edc831abf6c.tar.xz
s390/ipl: refactor deprecated strncpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. Use `strscpy` which has the same behavior as `strncpy` here with the extra safeguard of guaranteeing NUL-termination of destination strings. In it's current form, this may result in silent truncation if the src string has the same size as the destination string. [hca@linux.ibm.com: use strscpy() instead of strscpy_pad()] Link: www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings[1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20230811-arch-s390-kernel-v1-1-7edbeeab3809@google.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions