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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1279567881.11662.104.camel@powerslave>
Date:	Mon, 19 Jul 2010 22:31:21 +0300
From:	Luciano Coelho <luciano.coelho@...ia.com>
To:	ext Jan Engelhardt <jengelh@...ozas.de>
Cc:	Netfilter Developer Mailing List 
	<netfilter-devel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Patrick McHardy <kaber@...sh.net>,
	"sameo@...ux.intel.com" <sameo@...ux.intel.com>
Subject: Re: [RFC 1/2] netfilter: xt_condition: export list management code

On Mon, 2010-07-19 at 21:14 +0200, Coelho Luciano (Nokia-MS/Helsinki)
wrote:
> On Mon, 2010-07-19 at 18:13 +0200, ext Jan Engelhardt wrote:
> > On Monday 2010-07-19 16:15, Luciano Coelho wrote:
> > >@@ -3,12 +3,27 @@
> > > 
> > > #include <linux/types.h>
> > > 
> > >+#define XT_CONDITION_MAX_NAME_SIZE 30
> > >+
> > > struct xt_condition_mtinfo {
> > >-	char name[31];
> > >+	char name[XT_CONDITION_MAX_NAME_SIZE + 1];
> > > 	__u8 invert;
> > 
> > Oh noes. Please please avoid any math operations inside []. It has 
> > already driven XT_FUNCTION_MAXNAMELEN into nuts ("was it now +1 or -1, 
> > or even -2 that we needed to pass for various functions?"). Just let MAX 
> > be 31 and have name[MAX].
> 
> Yeah, I had already done as you suggested in my previous module
> (IDLETIMER), I don't know what I had in my head today when I did it
> differently.  Even the name of the macro is totally wrong (_SIZE), it
> would make a tiny little bit more sense if it was _LEN.  I'll change it.

I was not very clear here, I meant I'll change to what you proposed, ie.
keep it _SIZE and use 31, of course.


-- 
Cheers,
Luca.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ