public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Abdul Rahim <abdul.rahim@myyahoo.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfc: s3fwrn5: Prefer strscpy() over strcpy()
Date: Wed, 30 Oct 2024 06:57:28 +0100	[thread overview]
Message-ID: <8e68e02a-2c58-485c-a13e-a4b52616e63e@kernel.org> (raw)
In-Reply-To: <20241029221641.15726-1-abdul.rahim@myyahoo.com>

On 29/10/2024 23:16, Abdul Rahim wrote:
> 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.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


  reply	other threads:[~2024-10-30  5:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241029221641.15726-1-abdul.rahim.ref@myyahoo.com>
2024-10-29 22:16 ` [PATCH] nfc: s3fwrn5: Prefer strscpy() over strcpy() Abdul Rahim
2024-10-30  5:57   ` Krzysztof Kozlowski [this message]
2024-11-25 20:41     ` Abdul Rahim
2024-11-26  6:38       ` Krzysztof Kozlowski
2024-11-26  8:49         ` Abdul Rahim
2024-11-26  9:22           ` Krzysztof Kozlowski

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=8e68e02a-2c58-485c-a13e-a4b52616e63e@kernel.org \
    --to=krzk@kernel.org \
    --cc=abdul.rahim@myyahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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