All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ocfs2: Replace deprecated strcpy with strscpy
Date: Thu, 27 Nov 2025 11:13:51 +0100	[thread overview]
Message-ID: <69786F67-0B00-4FDE-8789-E22EDDB96CB1@linux.dev> (raw)
In-Reply-To: <2fd2f96c-6fe7-4100-ad74-04e587165102@linux.alibaba.com>

On 27. Nov 2025, at 02:13, Joseph Qi wrote:
> On 2025/11/26 19:44, Thorsten Blum wrote:
>> strcpy() has been deprecated [1] because it performs no bounds checking
>> on the destination buffer, which can lead to buffer overflows. Replace
>> it with the safer strscpy().  No functional changes.
>> 
>> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>> ---
>> [...]
> 
> It seems that all 'include' above are not needed.

They might not be necessary for the code to compile, but I think it's
recommended to add the headers to make the relationship explicit.

Thanks,
Thorsten


  reply	other threads:[~2025-11-27 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 11:44 [PATCH] ocfs2: Replace deprecated strcpy with strscpy Thorsten Blum
2025-11-27  1:13 ` Joseph Qi
2025-11-27 10:13   ` Thorsten Blum [this message]
2025-11-28  1:49 ` Joseph Qi

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=69786F67-0B00-4FDE-8789-E22EDDB96CB1@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.