[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLGAGpCK5MKH3e-8@alpha.franken.de>
Date: Fri, 29 Aug 2025 12:25:30 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: linux-hardening@...r.kernel.org, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/8] MIPS: sgi-ip32: Replace deprecated strcpy() in
plat_mem_setup()
On Sun, Aug 17, 2025 at 08:37:12PM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
> arch/mips/sgi-ip32/ip32-setup.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
> index aeb0805aae57..c2ebc4bbd866 100644
> --- a/arch/mips/sgi-ip32/ip32-setup.c
> +++ b/arch/mips/sgi-ip32/ip32-setup.c
> @@ -14,6 +14,7 @@
> #include <linux/interrupt.h>
> #include <linux/param.h>
> #include <linux/sched.h>
> +#include <linux/string.h>
>
> #include <asm/bootinfo.h>
> #include <asm/mipsregs.h>
> @@ -90,7 +91,7 @@ void __init plat_mem_setup(void)
> static char options[8] __initdata;
> char *baud = ArcGetEnvironmentVariable("dbaud");
> if (baud)
> - strcpy(options, baud);
> + strscpy(options, baud);
> add_preferred_console("ttyS", *(con + 1) == '2' ? 1 : 0,
> baud ? options : NULL);
> }
> --
> 2.50.1
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists