lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLGAfj_22Sr0j8Yh@alpha.franken.de>
Date: Fri, 29 Aug 2025 12:27:10 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	UNGLinuxDriver@...rochip.com, Paul Burton <paulburton@...nel.org>,
	linux-hardening@...r.kernel.org, linux-mips@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] MIPS: generic: Replace deprecated strcpy() in
 ocelot_detect()

On Sun, Aug 17, 2025 at 08:37:18PM +0200, Thorsten Blum wrote:
> 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/generic/board-ocelot.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/generic/board-ocelot.c b/arch/mips/generic/board-ocelot.c
> index 7115410acb4f..59a0fb243582 100644
> --- a/arch/mips/generic/board-ocelot.c
> +++ b/arch/mips/generic/board-ocelot.c
> @@ -4,6 +4,7 @@
>   *
>   * Copyright (c) 2017 Microsemi Corporation
>   */
> +#include <linux/string.h>
>  #include <asm/machine.h>
>  #include <asm/prom.h>
>  
> @@ -41,7 +42,7 @@ static __init bool ocelot_detect(void)
>  
>  		if (prom_argc > 1 && strlen(prom_argv[1]) > 0)
>  			/* ignore all built-in args if any f/w args given */
> -			strcpy(arcs_cmdline, prom_argv[1]);
> +			strscpy(arcs_cmdline, prom_argv[1]);
>  	}
>  
>  	return true;
> -- 
> 2.50.1

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 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ