Skip to content

Commit 5861bb3

Browse files
tobluxtsbogend
authored andcommitted
MIPS: sni: Replace deprecated strcpy() in sni_console_setup()
strcpy() is deprecated; use strscpy() instead. Link: KSPP#88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 5cd39d0 commit 5861bb3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/mips/sni/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/export.h>
1414
#include <linux/console.h>
1515
#include <linux/screen_info.h>
16+
#include <linux/string.h>
1617

1718
#ifdef CONFIG_FW_ARC
1819
#include <asm/fw/arc/types.h>
@@ -80,7 +81,7 @@ static void __init sni_console_setup(void)
8081
break;
8182
}
8283
if (baud)
83-
strcpy(options, baud);
84+
strscpy(options, baud);
8485
if (strncmp(cdev, "tty552", 6) == 0)
8586
add_preferred_console("ttyS", port,
8687
baud ? options : NULL);

0 commit comments

Comments
 (0)