Re: [PATCH] scsi: bfa: use strscpy to replace strlcpy

From: James Bottomley
Date: Fri Jul 01 2022 - 07:43:52 EST


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