nfc: s3fwrn5: Prefer strscpy() over strcpy()
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 nfc: s3fwrn5: Prefer strscpy() over strcpy()
strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors [1]
this fixes checkpatch warning:
WARNING: Prefer strscpy over strcpy
--- drivers/nfc/s3fwrn5/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/s3fwrn5/firmware.c +1 -1
@@ -469,7 +469,7 @@ void s3fwrn5_fw_init(struct s3fwrn5_fw_info *fw_info, const char *fw_name) fw_info->parity =0x00 ; fw_info->rsp =NULL ; fw_info->fw.fw =NULL ; -strcpy (fw_info->fw_name, fw_name); +strscpy (fw_info->fw_name, fw_name);init_completion (&fw_info->completion); }
Signature · 1 line
2.46.0
Quoted 6 lines · Abdul Rahim
strcpy()performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors [1]this fixes checkpatch warning:
WARNING: Prefer strscpy over strcpy
You should explain why it is safe to omit the destination buffer size.
Best regards,
Krzysztof
Do i need to resend it. What additional information do I need to provide?
Krzysztof Kozlowski
maintainerQuoted 2 lines · Abdul Rahim
Do i need to resend it. What additional information do I need to provide?
You cut entire email, no clue what's this.
Best regards,
Krzysztof
Quoted 10 lines · Krzysztof Kozlowski
Quoted 2 lines · Abdul Rahim
Do i need to resend it. What additional information do I need to provide?
You cut entire email, no clue what's this.
Best regards,
Krzysztof
Do I need to resend this patch [1]. You gave it Reviewed-by tag. But it's not applied yet.
[1]: https://lore.kernel.org/lkml/[email protected]/
Thanks,
Abdul
Krzysztof Kozlowski
maintainerQuoted 8 lines · Abdul Rahim
Quoted 7 lines · Krzysztof Kozlowski
Quoted 2 lines · Abdul Rahim
Do i need to resend it. What additional information do I need to provide?
You cut entire email, no clue what's this.
Quoted 8 lines
Quoted 3 lines
Best regards,
KrzysztofDo I need to resend this patch [1]. You gave it
Reviewed-bytag. But it's not applied yet.
First, it is merge window, no point to ping during that time. It is actually highly discouraged, unless this is a fix. And it is not a fix.
Second, this should have net-next PATCH prefix, see subsystem profile for networking.
I asked to change things in commit msg, so I expect next version, not resend.
Best regards,
Krzysztof