Thread (3 messages) 3 messages, 2 authors, 2026-03-02

Re: [PATCH net-next v2] NFC: s3fwrn5: Replace strcpy() with strscpy()

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2026-03-02 09:06:37
Also in: lkml

On 01/03/2026 18:49, tomasz.unger@yahoo.pl wrote:
From: Tomasz Unger <redacted>

Replace strcpy() with strscpy() which limits the copy to the size of
the destination buffer. Since fw_info->fw_name is an array with a fixed, declared size, the
two-argument variant of strscpy() is used - the compiler deduces
the buffer size automatically.

This is a defensive cleanup replacing the deprecated strcpy()
with the preferred strscpy().

Signed-off-by: Tomasz Unger <redacted>
---
Changes since v1:
- Clarified commit message: fw_info->fw_name described as
  "an array with a fixed, declared size" as requested by
  Krzysztof Kozlowski [off-list ref]

And ignored the rest?

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions
of patchset, under or above your Signed-off-by tag, unless patch changed
significantly (e.g. new properties added to the DT bindings). Tag is
"received", when provided in a message replied to you on the mailing
list. Tools like b4 can help here. However, there's no need to repost
patches *only* to add the tags. The upstream maintainer will do that for
tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state why and what changed.
</form letter>

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help