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] [thread-next>] [day] [month] [year] [list]
Message-ID: <57bc8c7b-72c6-e9a2-f03c-c840be6c9c35@linux.intel.com>
Date: Mon, 5 Jan 2026 16:21:56 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
cc: "Chen, Yu C" <yu.c.chen@...el.com>, Hans de Goede <hansg@...nel.org>, 
    Maximilian Luz <luzmaximilian@...il.com>, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/surface: Replace deprecated strcpy in
 surface_button_add

On Mon, 5 Jan 2026, Thorsten Blum wrote:

> On 5. Jan 2026, at 13:52, Chen, Yu C wrote:
> >> -	strcpy(name, SURFACE_BUTTON_DEVICE_NAME);
> >> +	strscpy(acpi_device_name(device), SURFACE_BUTTON_DEVICE_NAME);
> > 
> > Thanks for the fix, a minor question might be why we do not reuse
> > name by strscpy(name, SURFACE_BUTTON_DEVICE_NAME) ?
> 
> Because 'name' is a 'char *' from which the size of the destination
> buffer cannot be inferred by the 2-argument version of strscpy().
> 
> Using 'name' would force us to use strscpy() with 3 arguments:
> 
> strscpy(name, SURFACE_BUTTON_DEVICE_NAME, MAX_ACPI_DEVICE_NAME_LEN);

I suggest you just remove 'name' instead. It seems pretty useless to begin 
with but especially after your patch. :-)

Please also add () to the subject line after function names.

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ