diff options
author | Justin Stitt <justinstitt@google.com> | 2024-03-06 02:34:41 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-03-11 01:37:43 +0300 |
commit | 8fd4c9c8e1f33b76c02b0cb0421abafb1cf91e6b (patch) | |
tree | 789508b0ef67c35e6a45fbbde6e41fd315e55283 /scripts/lib/kdoc/kdoc_files.py | |
parent | 1b60c86dd9928688469a9dd09582538aead85d32 (diff) | |
download | linux-8fd4c9c8e1f33b76c02b0cb0421abafb1cf91e6b.tar.xz |
scsi: smartpqi: Replace deprecated strncpy() with strscpy()
buffer->driver_version is sized 32:
| struct bmic_host_wellness_driver_version {
| ...
| char driver_version[32];
... the source string "Linux " + DRIVER_VERISON is sized at 16. There's
really no bug in the existing code since the buffers are sized
appropriately with great care taken to manually NUL-terminate the
destination buffer. Nonetheless, let's make the swap over to strscpy()
for robustness' (and readability's) sake.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240305-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v3-6-5b78a13ff984@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions