]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: sgi-ip32: Replace deprecated strcpy() in plat_mem_setup()
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 17 Aug 2025 18:37:12 +0000 (20:37 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 29 Aug 2025 20:34:30 +0000 (22:34 +0200)
strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/sgi-ip32/ip32-setup.c

index aeb0805aae57bacfef7b95877042a6dc476a14a5..c2ebc4bbd8668ed2e395c7e9e061f9f63b2f3d3a 100644 (file)
@@ -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);
                }