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: <148f58b6-fe56-4fd2-b430-d6aa40037bb5@moroto.mountain>
Date: Mon, 18 Mar 2024 11:05:45 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16

On Mon, Mar 18, 2024 at 08:51:33AM +0530, Ratheesh Kannoth wrote:
> On 2024-03-16 at 15:46:10, Christophe JAILLET (christophe.jaillet@...adoo.fr) wrote:
> > UTILITY_NAME_LENGTH is 16. So better use the former when defining the
> > 'utility_name' array. This makes the intent clearer when it is used around
> > line 260.
> >
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > ---
> >  net/caif/cfctrl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
> > index 8480684f2762..b6d9462f92b9 100644
> > --- a/net/caif/cfctrl.c
> > +++ b/net/caif/cfctrl.c
> > @@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
> >  	u8 tmp8;
> >  	struct cfctrl_request_info *req;
> >  	int ret;
> > -	char utility_name[16];
> > +	char utility_name[UTILITY_NAME_LENGTH];
> Reverse xmas tree.
> 

It's always hard to know what to do when the original code isn't in the
correct format.  Someone sent a patch last week which fixed a bug and
partially converted a declaration block into reverse Christmas tree...

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ