Skip to content

Commit 6a1e6bf

Browse files
tobluxtsbogend
authored andcommitted
MIPS: generic: Replace deprecated strcpy() in ocelot_detect()
strcpy() is deprecated; use strscpy() instead. Link: KSPP#88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent e34b690 commit 6a1e6bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/mips/generic/board-ocelot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Copyright (c) 2017 Microsemi Corporation
66
*/
7+
#include <linux/string.h>
78
#include <asm/machine.h>
89
#include <asm/prom.h>
910

@@ -41,7 +42,7 @@ static __init bool ocelot_detect(void)
4142

4243
if (prom_argc > 1 && strlen(prom_argv[1]) > 0)
4344
/* ignore all built-in args if any f/w args given */
44-
strcpy(arcs_cmdline, prom_argv[1]);
45+
strscpy(arcs_cmdline, prom_argv[1]);
4546
}
4647

4748
return true;

0 commit comments

Comments
 (0)