]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFC: s3fwrn5: Replace strcpy() with strscpy()
authorTomasz Unger <tomasz.unger@yahoo.pl>
Mon, 2 Mar 2026 10:09:08 +0000 (11:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 Mar 2026 01:13:18 +0000 (17:13 -0800)
commit8ce185c7e00dbddfdea026acd5dcf7b122af3db0
treed8bce122f87e3e2a5233239c04109ab081424dca
parentc49a9eb650d5b6c9a19901e9055ad4e0a0d2386e
NFC: s3fwrn5: Replace strcpy() with strscpy()

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 <tomasz.unger@yahoo.pl>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260302100908.26399-1-tomasz.unger@yahoo.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/s3fwrn5/firmware.c