summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-10-13 21:19:02 +0000
committerKalle Valo <quic_kvalo@quicinc.com>2023-10-18 11:32:36 +0300
commit40990961d9836efd1a404432e5d5bf6fbc78c138 (patch)
treef68bf55aff8f929bbff5822133e2cc92eba256bb /tools/perf/scripts/python/gecko.py
parent24709752bfe8bc0147c9379a6ec8fe8d75874066 (diff)
wifi: ath6kl: replace deprecated strncpy with memcpy
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous interfaces. The affected code's purpose is to truncate strings that are too long with "..." like: foobar -> fo... The lengths have been carefully calculated and as such this has decayed to a simple byte copy from one buffer to another -- let's use memcpy(). Note: build-tested only. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20231013-strncpy-drivers-net-wireless-ath-ath6kl-init-c-v1-1-d69c599b49a9@google.com
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions