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: <063D6719AE5E284EB5DD2968C1650D6D174876B4@AcuExch.aculab.com>
Date:	Thu, 4 Sep 2014 14:23:53 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Eric Dumazet' <eric.dumazet@...il.com>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>
CC:	Denis Kirjanov <kirjanov@...il.com>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	Daniel Borkmann <dborkman@...hat.com>,
	"Eric Dumazet" <edumazet@...gle.com>,
	Denis Kirjanov <kda@...ux-powerpc.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Markos Chandras <markos.chandras@...tec.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: RE: [PATCH v2 net-next] net: filter: export pkt_type_offset() helper

From: Eric Dumazet
> On Thu, 2014-09-04 at 15:40 +0200, Hannes Frederic Sowa wrote:
> 
> > The type does not matter at all. Actually I wanted to use an empty
> > struct but was afraid it might not work on older compilers and didn't
> > want to check that with each version.
> 
> 
> It matters. Really.
> 
> $ cat try.c
> #include <stdio.h>
> 
> struct S_int {
> 	char a;
> 	int offset[0];
> 	char b:1;
> };
> 
> struct S_char {
> 	char a;
> 	char offset[0];
> 	char b:1;
> };

Those are also both illegal C, zero sized arrays aren't allowed.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ