[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <894851e7-f057-4789-f9af-f098a968d713@broadcom.com>
Date: Fri, 23 Aug 2019 10:18:13 +0200
From: Arend Van Spriel <arend.vanspriel@...adcom.com>
To: Xulin Sun <xulin.sun@...driver.com>, kvalo@...eaurora.org
Cc: stefan.wahren@...e.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, brcm80211-dev-list@...ress.com,
brcm80211-dev-list.pdl@...adcom.com,
linux-wireless@...r.kernel.org, franky.lin@...adcom.com,
hante.meuleman@...adcom.com, chi-hsien.lin@...ress.com,
wright.feng@...ress.com, davem@...emloft.net,
stanley.hsu@...ress.com
Subject: Re: [PATCH] brcmfmac: replace strncpy() by strscpy()
On 8/23/2019 9:47 AM, Xulin Sun 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);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Acked-by: Arend van Spriel <arend.vanspriel@...adcom.com>
> Signed-off-by: Xulin Sun <xulin.sun@...driver.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Powered by blists - more mailing lists