From: Thorsten Blum Date: Sun, 17 Aug 2025 18:37:18 +0000 (+0200) Subject: MIPS: generic: Replace deprecated strcpy() in ocelot_detect() X-Git-Tag: v6.18-rc1~69^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a1e6bf933b6216cc3eb731a14cd519c189d3a04;p=thirdparty%2Flinux.git 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 Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/generic/board-ocelot.c b/arch/mips/generic/board-ocelot.c index 7115410acb4fe..59a0fb2435824 100644 --- a/arch/mips/generic/board-ocelot.c +++ b/arch/mips/generic/board-ocelot.c @@ -4,6 +4,7 @@ * * Copyright (c) 2017 Microsemi Corporation */ +#include #include #include @@ -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;