strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Cc: linux-harden...@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.b...@linux.dev>
---
 arch/alpha/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index ed06367ece57..56155b988b9c 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -262,7 +262,7 @@ recv_secondary_console_msg(void)
 
                cnt = cpu->ipc_buffer[0] >> 32;
                if (cnt <= 0 || cnt >= 80)
-                       strcpy(buf, "<<< BOGUS MSG >>>");
+                       strscpy(buf, "<<< BOGUS MSG >>>");
                else {
                        cp1 = (char *) &cpu->ipc_buffer[1];
                        cp2 = buf;
-- 
2.49.0


Reply via email to