aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorJustin Stitt <[email protected]>2023-08-11 21:56:15 +0000
committerHeiko Carstens <[email protected]>2023-08-18 13:08:12 +0000
commitcfd012107f11ec4af010f11eca341edc831abf6c (patch)
tree23e77634348c056f784a92f53e0cb1ce836fe7f9 /rust/helpers.c
parents390/ipl: fix virtual vs physical address confusion (diff)
downloadkernel-cfd012107f11ec4af010f11eca341edc831abf6c.tar.gz
kernel-cfd012107f11ec4af010f11eca341edc831abf6c.zip
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. [[email protected]: 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: [email protected] Signed-off-by: Justin Stitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions