Skip to content
Commit b7e9712a authored by Justin Stitt's avatar Justin Stitt Committed by Martin K. Petersen
Browse files

scsi: mpt3sas: Replace deprecated strncpy() with strscpy()



The replacement in mpt3sas_base.c is a trivial one because desc is already
zero-initialized meaning there is no functional change here.

For mpt3sas_transport.c, we know edev is zero-initialized as well while
manufacture_reply comes from dma_alloc_coherent(). No functional change
here either.

For all cases, use the more idiomatic strscpy() usage of: strscpy(dest,
src, sizeof(dest))

Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240305-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v3-2-5b78a13ff984@google.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8c8e2422
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment