Re: [PATCH] net: qcom/emac: Replace strlcpy with strscpy
From: patchwork-bot+netdevbpf
Date: Mon Sep 06 2021 - 11:50:10 EST
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Mon, 6 Sep 2021 21:56:53 +0800 you wrote:
> The strlcpy should not be used because it doesn't limit the source
> length. As linus says, it's a completely useless function if you
> can't implicitly trust the source string - but that is almost always
> why people think they should use it! All in all the BSD function
> will lead some potential bugs.
>
> But the strscpy doesn't require reading memory from the src string
> beyond the specified "count" bytes, and since the return value is
> easier to error-check than strlcpy()'s. In addition, the implementation
> is robust to the string changing out from underneath it, unlike the
> current strlcpy() implementation.
>
> [...]
Here is the summary with links:
- net: qcom/emac: Replace strlcpy with strscpy
https://git.kernel.org/netdev/net/c/0a83299935f0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html