Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: sgi-ip32: Replace deprecated strcpy() in plat_mem_setup()

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>

authored by

Thorsten Blum and committed by
Thomas Bogendoerfer
5cd39d00 e5a6d4a2

+2 -1
+2 -1
arch/mips/sgi-ip32/ip32-setup.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/param.h> 16 16 #include <linux/sched.h> 17 + #include <linux/string.h> 17 18 18 19 #include <asm/bootinfo.h> 19 20 #include <asm/mipsregs.h> ··· 91 90 static char options[8] __initdata; 92 91 char *baud = ArcGetEnvironmentVariable("dbaud"); 93 92 if (baud) 94 - strcpy(options, baud); 93 + strscpy(options, baud); 95 94 add_preferred_console("ttyS", *(con + 1) == '2' ? 1 : 0, 96 95 baud ? options : NULL); 97 96 }