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: <alpine.DEB.2.21.2509030204040.16010@angie.orcam.me.uk>
Date: Wed, 3 Sep 2025 02:08:37 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Osama Abdelkader <osama.abdelkader@...il.com>
cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>, 
    linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mips: math-emu: replace deprecated strcpy() in
 me-debugfs

On Tue, 2 Sep 2025, Osama Abdelkader wrote:

> diff --git a/arch/mips/math-emu/me-debugfs.c b/arch/mips/math-emu/me-debugfs.c
> index d5ad76b2bb67..49bf2b827ce2 100644
> --- a/arch/mips/math-emu/me-debugfs.c
> +++ b/arch/mips/math-emu/me-debugfs.c
> @@ -37,11 +37,11 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_fpuemu_stat, fpuemu_stat_get, NULL, "%llu\n");
>   * used in debugfs item names to be clearly associated to corresponding
>   * MIPS FPU instructions.
>   */
> -static void adjust_instruction_counter_name(char *out_name, char *in_name)
> +static void adjust_instruction_counter_name(char *out_name, size_t len, char *in_name)
>  {
>  	int i = 0;
>  
> -	strcpy(out_name, in_name);
> +	strscpy(out_name, in_name, len);

 It'd make sense to keep the order of the incoming parameters the same as 
the arguments here so as to avoid the need for register shuffling.

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ