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
| ||
|
Message-Id: <20190504.004700.1643902028919203643.davem@davemloft.net> Date: Sat, 04 May 2019 00:47:00 -0400 (EDT) From: David Miller <davem@...emloft.net> To: gustavo@...eddedor.com Cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH net-next] net: sched: cls_u32: use struct_size() helper From: "Gustavo A. R. Silva" <gustavo@...eddedor.com> Date: Wed, 1 May 2019 11:23:15 -0500 > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, replace code of the following form: > > sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key) > > with: > > struct_size(s, keys, s->nkeys) > > This code was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com> Applied.
Powered by blists - more mailing lists