From: Kalle Valo <kvalo@kernel•org>
To: cgel.zte@gmail•com
Cc: chunkeey@googlemail•com, davem@davemloft•net,
edumazet@google•com, kuba@kernel•org, pabeni@redhat•com,
linux-wireless@vger•kernel.org, netdev@vger•kernel.org,
linux-kernel@vger•kernel.org,
Minghao Chi <chi.minghao@zte•com.cn>,
Zeal Robot <zealci@zte•com.cn>
Subject: Re: [PATCH] carl9170: use strscpy() is more robust and safer
Date: Fri, 16 Sep 2022 11:48:42 +0300 [thread overview]
Message-ID: <87k0637lhx.fsf@kernel.org> (raw)
In-Reply-To: <20220916063047.155021-1-chi.minghao@zte.com.cn> (cgel zte's message of "Fri, 16 Sep 2022 06:30:47 +0000")
cgel.zte@gmail•com writes:
> From: Minghao Chi <chi.minghao@zte•com.cn>
>
> The implementation of strscpy() is more robust and safer.
>
> That's now the recommended way to copy NUL terminated strings.
>
> Reported-by: Zeal Robot <zealci@zte•com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte•com.cn>
> ---
> drivers/net/wireless/ath/carl9170/fw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c
> index 1ab09e1c9ec5..4c1aecd1163c 100644
> --- a/drivers/net/wireless/ath/carl9170/fw.c
> +++ b/drivers/net/wireless/ath/carl9170/fw.c
> @@ -105,7 +105,7 @@ static void carl9170_fw_info(struct ar9170 *ar)
> CARL9170FW_GET_MONTH(fw_date),
> CARL9170FW_GET_DAY(fw_date));
>
> - strlcpy(ar->hw->wiphy->fw_version, motd_desc->release,
> + strscpy(ar->hw->wiphy->fw_version, motd_desc->release,
> sizeof(ar->hw->wiphy->fw_version));
Already changed in:
https://git.kernel.org/netdev/net-next/c/bf99f11df4de
Please use latest trees to avoid duplicate work.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2022-09-16 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 6:30 [PATCH] carl9170: use strscpy() is more robust and safer cgel.zte
2022-09-16 8:48 ` 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=87k0637lhx.fsf@kernel.org \
--to=kvalo@kernel$(echo .)org \
--cc=cgel.zte@gmail$(echo .)com \
--cc=chi.minghao@zte$(echo .)com.cn \
--cc=chunkeey@googlemail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=zealci@zte$(echo .)com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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