summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-04-08 12:28:40 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2025-04-11 21:28:16 -0400
commitcdcb08d5710bc9b543551a85ad551f44d6a4bfc0 (patch)
tree6f7c4b815b593d0585a8351ccee0e71e8de411db /tools/perf/scripts/python/export-to-postgresql.py
parent20c74f892645c621df7c1d8e9a0b97793655d4db (diff)
scsi: elx: sli4: Replace deprecated strncpy() with strscpy()
strncpy() is deprecated for NUL-terminated destination buffers; use strscpy() instead. Since sli_config_cmd_init() already zeroes out the destination buffers, the potential NUL-padding by strncpy() is unnecessary. strscpy() copies only the required characters and guarantees NUL-termination. And since all three destination buffers have a fixed length, strscpy() automatically determines their size using sizeof() when the argument is omitted. This makes any explicit sizeof() calls unnecessary. The source strings are also NUL-terminated and meet the __must_be_cstr() requirement of strscpy(). No functional changes intended. Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://lore.kernel.org/r/20250408102843.804083-2-thorsten.blum@linux.dev Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions