]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 22 Apr 2025 07:42:55 +0000 (09:42 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sun, 27 Apr 2025 07:47:09 +0000 (09:47 +0200)
strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/bcm63xx/boards/board_bcm963xx.c

index 9cc8fbf218a596d558c68812c2a52d508a03a278..c5617b889b1c6b8ed091dfd00eafa428801c8185 100644 (file)
@@ -764,7 +764,7 @@ void __init board_prom_init(void)
                        snprintf(cfe_version, 12, "%s", (char *) &cfe[4]);
                }
        } else {
-               strcpy(cfe_version, "unknown");
+               strscpy(cfe_version, "unknown");
        }
        pr_info("CFE version: %s\n", cfe_version);