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: <05702c97-f210-4d5f-94cf-c2f98027e29b@app.fastmail.com>
Date: Thu, 28 Mar 2024 17:15:21 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Dan Carpenter" <dan.carpenter@...aro.org>,
 "Arnd Bergmann" <arnd@...nel.org>
Cc: linux-kernel@...r.kernel.org,
 "Florian Fainelli" <florian.fainelli@...adcom.com>,
 "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 "Broadcom internal kernel review list" <bcm-kernel-feedback-list@...adcom.com>,
 linux-rpi-kernel@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
 linux-staging@...ts.linux.dev
Subject: Re: [PATCH 01/11] staging: vc04_services: changen strncpy() to strscpy_pad()

On Thu, Mar 28, 2024, at 15:42, Dan Carpenter wrote:
> On Thu, Mar 28, 2024 at 03:04:45PM +0100, Arnd Bergmann wrote:
>> diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> index 258aa0e37f55..6ca5797aeae5 100644
>> --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
>> @@ -937,8 +937,8 @@ static int create_component(struct vchiq_mmal_instance *instance,
>>  	/* build component create message */
>>  	m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
>>  	m.u.component_create.client_component = component->client_component;
>> -	strncpy(m.u.component_create.name, name,
>> -		sizeof(m.u.component_create.name));
>> +	strscpy_pad(m.u.component_create.name, name,
>> +		    sizeof(m.u.component_create.name));
>
> You sent this earlier and we already applied it.

Sorry about that. I normally mark patches I send as applied
in the subject but it looks like I lost the annotation
by accident.

> Btw, I just learned there is a new trick to write this when it's just
> sizeof(dest).
>
> 	strscpy_pad(m.u.component_create.name, name);

Ah, cute.

     arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ