linux/drivers/net/wireless/ath/ath6kl
Justin Stitt 40990961d9 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
2023-10-18 11:32:36 +03:00
..
Kconfig
Makefile Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12" 2023-07-26 10:09:28 +03:00
bmi.c wifi: ath6kl: minor fix for allocation size 2023-02-17 18:03:04 +02:00
bmi.h
cfg80211.c wifi: cfg80211: split struct cfg80211_ap_settings 2023-09-25 09:00:39 +02:00
cfg80211.h
common.h
core.c cfg80211: avoid holding the RTNL when calling the driver 2021-01-26 11:55:50 +01:00
core.h
debug.c wifi: ath6kl: Remove error checking for debugfs_create_dir() 2023-07-25 17:30:54 +03:00
debug.h
hif-ops.h
hif.c
hif.h wifi: ath6kl: fix repeated words in comments 2022-07-18 13:04:32 +03:00
htc-ops.h
htc.h ath6kl: Use struct_group() to avoid size-mismatched casting 2021-12-09 10:00:12 +02:00
htc_mbox.c ath6kl: fix typos in comments 2022-03-18 17:38:45 +02:00
htc_pipe.c wifi: ath6kl: reduce WARN to dev_dbg() in callback 2023-02-27 14:19:35 +02:00
init.c wifi: ath6kl: replace deprecated strncpy with memcpy 2023-10-18 11:32:36 +03:00
main.c wifi: ath6kl: remove unnecessary (void*) conversions 2023-09-21 11:08:22 +03:00
recovery.c
sdio.c wifi: ath6kl: fix repeated words in comments 2022-07-18 13:04:32 +03:00
target.h
testmode.c
testmode.h
trace.c
trace.h tracing/ath: Use the new __vstring() helper 2022-07-15 17:44:40 -04:00
txrx.c wifi: ath6kl: remove unnecessary (void*) conversions 2023-09-21 11:08:22 +03:00
usb.c ath6kl: avoid flush_scheduled_work() usage 2022-06-20 13:04:49 +03:00
wmi.c ath6kl: wmi: Replace one-element array with flexible-array member in struct wmi_aplist_event 2022-03-09 17:07:44 +02:00
wmi.h wifi: ath6kl: fix repeated words in comments 2022-07-18 13:04:32 +03:00