Skip to content

Commit e5a6d4a

Browse files
tobluxtsbogend
authored andcommitted
MIPS: sgi-ip22: Replace deprecated strcpy() in plat_mem_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 cb96fd8 commit e5a6d4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/mips/sgi-ip22/ip22-setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/types.h>
1212
#include <linux/console.h>
1313
#include <linux/sched.h>
14+
#include <linux/string.h>
1415
#include <linux/tty.h>
1516

1617
#include <asm/addrspace.h>
@@ -65,7 +66,7 @@ void __init plat_mem_setup(void)
6566
static char options[8] __initdata;
6667
char *baud = ArcGetEnvironmentVariable("dbaud");
6768
if (baud)
68-
strcpy(options, baud);
69+
strscpy(options, baud);
6970
add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
7071
baud ? options : NULL);
7172
} else if (!ctype || *ctype != 'g') {

0 commit comments

Comments
 (0)