Skip to content
Commit 5ea0c313 authored by Kalle Valo's avatar Kalle Valo
Browse files

wifi: hostap: fix stringop-truncations GCC warning



With GCC 13.1 and W=1 hostap has a warning:

drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3633:17: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]

fortify-string.h recommends not to use strncpy() so use strscpy() which fixes
the warning. Also now it's guarenteed that the string is NUL-terminated.

Compile tested only.

Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230613140918.389690-4-kvalo@kernel.org
parent 4b6ec74e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment