diff options
author | Justin Stitt <justinstitt@google.com> | 2024-03-05 23:34:36 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-03-10 18:37:43 -0400 |
commit | 8c8e2422bde198efa57566d768400f73cc485aad (patch) | |
tree | 7206a10d909c596a3c3744fa0ef38058fdd1acb8 /tools/perf/scripts/python/stackcollapse.py | |
parent | 16cc2ba71b9f6440805aef7f92ba0f031f79b765 (diff) |
scsi: mpi3mr: Replace deprecated strncpy() with assignments
Really, there's no bug with the current code. Let's just ditch strncpy()
all together.
We can just copy the const strings instead of reserving room on the stack.
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
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-1-5b78a13ff984@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions