From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B1A925178E; Sun, 27 Apr 2025 08:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745743729; cv=none; b=KcJlSMjGhmYSyrXwotRdH1ZD6AmZ+MWBidgBL+8Gt1WyEAHJvNAgN6rik7foozgwv3y//DEwOMV7geBMX51B05HL/2/aTemSIU9YUiJfJRAjG7rKWqkltAxe4L5nfvIsvqtA+xu8zufm02CyfHDvFLFr0QJWdORO7+Qe6Z2N2oo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745743729; c=relaxed/simple; bh=R/i3UWuvMC8Y8kBqHMrj/K8JCWtfnW6Fo6LEyskQU1A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kWFdgnYWEAqRSNJfpNCi4NlOVbnuWu1wWDry86ptPT0oK8YDkZTWtMxmSe++ADis9CFiM16SrAIB4Yx1DriDyiFA7kywEqLRHa5L1RpVVT4zK1sZmtrs3kVrPLnkNQBl2xMpBRMLCFo/yE3vACy6P0TbRS81ZnGbylccy7qQWsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1u8wse-0007Ks-00; Sun, 27 Apr 2025 09:56:52 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 4479CC0B2A; Sun, 27 Apr 2025 09:55:58 +0200 (CEST) Date: Sun, 27 Apr 2025 09:55:58 +0200 From: Thomas Bogendoerfer To: Thorsten Blum Cc: Alexander Sverdlin , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , linux-hardening@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init() Message-ID: References: <20250422074257.544016-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250422074257.544016-2-thorsten.blum@linux.dev> On Tue, Apr 22, 2025 at 09:42:55AM +0200, Thorsten Blum wrote: > 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 > --- > arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c > index 9cc8fbf218a5..c5617b889b1c 100644 > --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c > +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c > @@ -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); > > -- > 2.49.0 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]