MIPS: generic: Replace deprecated strcpy() in ocelot_detect()

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>
This commit is contained in:
Thorsten Blum 2025-08-17 20:37:18 +02:00 committed by Thomas Bogendoerfer
parent e34b690f58
commit 6a1e6bf933
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
*
* Copyright (c) 2017 Microsemi Corporation
*/
#include <linux/string.h>
#include <asm/machine.h>
#include <asm/prom.h>
@ -41,7 +42,7 @@ static __init bool ocelot_detect(void)
if (prom_argc > 1 && strlen(prom_argv[1]) > 0)
/* ignore all built-in args if any f/w args given */
strcpy(arcs_cmdline, prom_argv[1]);
strscpy(arcs_cmdline, prom_argv[1]);
}
return true;