* [PATCH] carl9170: use strscpy() is more robust and safer
@ 2022-09-16 6:30 cgel.zte
2022-09-16 8:48 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-16 6:30 UTC (permalink / raw)
To: chunkeey
Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
linux-kernel, Minghao Chi, Zeal Robot
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));
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] carl9170: use strscpy() is more robust and safer
2022-09-16 6:30 [PATCH] carl9170: use strscpy() is more robust and safer cgel.zte
@ 2022-09-16 8:48 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-09-16 8:48 UTC (permalink / raw)
To: cgel.zte
Cc: chunkeey, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
linux-kernel, Minghao Chi, Zeal Robot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-16 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 6:30 [PATCH] carl9170: use strscpy() is more robust and safer cgel.zte
2022-09-16 8:48 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.