Thread (3 messages) 3 messages, 3 authors, 2019-09-03

Re: [PATCH] brcmfmac: replace strncpy() by strscpy()

From: Kalle Valo <hidden>
Date: 2019-09-03 13:43:54
Also in: linux-wireless, lkml

Xulin Sun [off-list ref] wrote:
The strncpy() may truncate the copied string,
replace it by the safer strscpy().

To avoid below compile warning with gcc 8.2:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:In function 'brcmf_vndr_ie':
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4227:2:
warning: 'strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
  strncpy(iebuf, add_del_cmd, VNDR_IE_CMD_LEN - 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xulin Sun <redacted>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Patch applied to wireless-drivers-next.git, thanks.

5f42b382ead2 brcmfmac: replace strncpy() by strscpy()

-- 
https://patchwork.kernel.org/patch/11110841/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help