aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorAzeem Shaikh <[email protected]>2023-06-15 18:03:18 +0000
committerGreg Kroah-Hartman <[email protected]>2023-06-19 15:34:40 +0200
commitee400a1be11527e1ea58b716b338b9fb6665b8d6 (patch)
tree47f9b2631f9dc00af16fa2b38ff958e86ae1f13a /tools/perf/scripts/python/bin/export-to-postgresql-report
parent8be558dcffe69b078b34b1fa93b82acaf4ce4957 (diff)
usb: gadget: function: printer: Replace strlcpy with strscpy
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). Direct replacement is safe here since return value of -errno is used to check for truncation instead of PAGE_SIZE. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions