[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250817183728.612012-3-thorsten.blum@linux.dev>
Date: Sun, 17 Aug 2025 20:37:13 +0200
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thorsten Blum <thorsten.blum@...ux.dev>,
Thomas Zimmermann <tzimmermann@...e.de>
Cc: linux-hardening@...r.kernel.org,
linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/8] 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@...ux.dev>
---
arch/mips/sni/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 03cb69937258..fc7da12284f5 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -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);
--
2.50.1
Powered by blists - more mailing lists