]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: txx9: Replace deprecated strcpy() with strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 17 Aug 2025 18:37:14 +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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/txx9/generic/setup.c

index 5dc867ea2c69c65a8becb9cd3cf0a876523410fb..03f8a3a95637325c1429981b462caf29e17f2ae5 100644 (file)
@@ -200,7 +200,7 @@ static void __init preprocess_cmdline(void)
        static char cmdline[COMMAND_LINE_SIZE] __initdata;
        char *s;
 
-       strcpy(cmdline, arcs_cmdline);
+       strscpy(cmdline, arcs_cmdline);
        s = cmdline;
        arcs_cmdline[0] = '\0';
        while (s && *s) {
@@ -270,7 +270,7 @@ void __init prom_init(void)
        preprocess_cmdline();
        select_board();
 
-       strcpy(txx9_system_type, txx9_board_vec->system);
+       strscpy(txx9_system_type, txx9_board_vec->system);
 
        txx9_board_vec->prom_init();
 }