From: Kalle Valo <kvalo@codeaurora.org>
To: Xulin Sun <xulin.sun@windriver.com>
Cc: <stefan.wahren@i2se.com>, <xulin.sun@windriver.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<brcm80211-dev-list@cypress.com>,
<brcm80211-dev-list.pdl@broadcom.com>,
<linux-wireless@vger.kernel.org>, <arend.vanspriel@broadcom.com>,
<franky.lin@broadcom.com>, <hante.meuleman@broadcom.com>,
<chi-hsien.lin@cypress.com>, <wright.feng@cypress.com>,
<davem@davemloft.net>, <stanley.hsu@cypress.com>
Subject: Re: [PATCH] brcmfmac: replace strncpy() by strscpy()
Date: Tue, 3 Sep 2019 13:43:51 +0000 (UTC) [thread overview]
Message-ID: <20190903134351.65443602CA@smtp.codeaurora.org> (raw)
In-Reply-To: <20190823074708.20081-1-xulin.sun@windriver.com>
Xulin Sun <xulin.sun@windriver.com> 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 <xulin.sun@windriver.com>
> 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
prev parent reply other threads:[~2019-09-03 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 7:47 [PATCH] brcmfmac: replace strncpy() by strscpy() Xulin Sun
2019-08-23 8:18 ` Arend Van Spriel
2019-09-03 13:43 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903134351.65443602CA@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=chi-hsien.lin@cypress.com \
--cc=davem@davemloft.net \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stanley.hsu@cypress.com \
--cc=stefan.wahren@i2se.com \
--cc=wright.feng@cypress.com \
--cc=xulin.sun@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).