LKML Archive on
help / color / mirror / Atom feed
To: Jason Wang <>
Subject: Re: [PATCH] dpaa2-eth: Replace strlcpy with strscpy
Date: Tue, 31 Aug 2021 11:10:08 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


This patch was applied to netdev/net-next.git (refs/heads/master):

On Mon, 30 Aug 2021 21:05:31 +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:
  - dpaa2-eth: Replace strlcpy with strscpy

You are awesome, thank you!
Deet-doot-dot, I am a bot.

      reply	other threads:[~2021-08-31 11:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 13:05 Jason Wang
2021-08-31 11:10 ` patchwork-bot+netdevbpf [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] dpaa2-eth: Replace strlcpy with strscpy' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).