mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68knommu: Replace deprecated strcpy with strscpy in init_ucsimm
Date: Mon, 19 Jan 2026 09:23:13 +1000	[thread overview]
Message-ID: <7e3e6aa7-9d9b-424a-8964-d18d26df1f06@linux-m68k.org> (raw)
In-Reply-To: <20260118173349.1197500-2-thorsten.blum@linux.dev>

Hi Thorsten,

On 19/1/26 03:33, 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().
> 
> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Thanks, applied to m68knommu git tree, for-next branch.

Regards
Greg



> ---
> Compile-tested only.
> ---
>   arch/m68k/68000/ucsimm.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/m68k/68000/ucsimm.c b/arch/m68k/68000/ucsimm.c
> index c54fde75eae8..6b84e826040f 100644
> --- a/arch/m68k/68000/ucsimm.c
> +++ b/arch/m68k/68000/ucsimm.c
> @@ -9,6 +9,7 @@
>    * for more details.
>    */
>   #include <linux/init.h>
> +#include <linux/string.h>
>   #include <asm/bootstd.h>
>   #include <asm/machdep.h>
>   #include <asm/MC68VZ328.h>
> @@ -31,7 +32,7 @@ void __init init_ucsimm(char *command, int size)
>   	pr_info("uCsimm/uCdimm hwaddr %pM\n", p);
>   	p = getbenv("APPEND");
>   	if (p)
> -		strcpy(p, command);
> +		strscpy(p, command, size);
>   	else
>   		command[0] = 0;
>   }


      reply	other threads:[~2026-01-18 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 17:33 Thorsten Blum
2026-01-18 23:23 ` Greg Ungerer [this message]

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=7e3e6aa7-9d9b-424a-8964-d18d26df1f06@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=thorsten.blum@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®