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] [day] [month] [year] [list]
Date:   Sat, 04 May 2019 00:05:45 -0400 (EDT)
From:   David Miller <>
Subject: Re: [PATCH net-next] wimax/i2400m: use struct_size() helper

From: "Gustavo A. R. Silva" <>
Date: Tue, 30 Apr 2019 22:27:32 -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(*tx_msg) + le16_to_cpu(tx_msg->num_pls) * sizeof(tx_msg->pld[0]);
> with:
> struct_size(tx_msg, pld, le16_to_cpu(tx_msg->num_pls));
> This code was detected with the help of Coccinelle.
> Signed-off-by: Gustavo A. R. Silva <>


Powered by blists - more mailing lists