MIPS: sni: Replace deprecated strcpy() in sni_console_setup()

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

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
Thorsten Blum 2025-08-17 20:37:13 +02:00 committed by Thomas Bogendoerfer
parent 5cd39d00c2
commit 5861bb3ea2
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@
#include <linux/export.h>
#include <linux/console.h>
#include <linux/screen_info.h>
#include <linux/string.h>
#ifdef CONFIG_FW_ARC
#include <asm/fw/arc/types.h>
@ -80,7 +81,7 @@ static void __init sni_console_setup(void)
break;
}
if (baud)
strcpy(options, baud);
strscpy(options, baud);
if (strncmp(cdev, "tty552", 6) == 0)
add_preferred_console("ttyS", port,
baud ? options : NULL);