mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: XueBing Chen <chenxuebing@jari.cn>, martin.petersen@oracle.com
Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: bfa: use strscpy to replace strlcpy
Date: Fri, 01 Jul 2022 07:43:30 -0400	[thread overview]
Message-ID: <1338d1aed2e55c3107363a6b7e521d75f877db2f.camel@linux.ibm.com> (raw)
In-Reply-To: <2975fca0.d18.181b97a760e.Coremail.chenxuebing@jari.cn>

On Fri, 2022-07-01 at 19:16 +0800, XueBing Chen wrote:
> The strlcpy should not be used

That's not true.

>  because it doesn't limit the source length. Preferred is strscpy.

And that's not the reason why strscpy is often a marginally better
choice.  In the case of what you change in bfa, none of the reasons why
strscpy might be marginally better actually apply.

James



      reply	other threads:[~2022-07-01 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 11:16 XueBing Chen
2022-07-01 11:43 ` James Bottomley [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=1338d1aed2e55c3107363a6b7e521d75f877db2f.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=chenxuebing@jari.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sudarsana.kalluru@qlogic.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

all inboxes | Powered by JetHome®