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] [day] [month] [year] [list]
Message-ID: <13ad5f5e-28b3-fb1b-6a3b-4a5c347be6db@axentia.se>
Date:   Tue, 11 Jun 2019 07:21:34 +0000
From:   Peter Rosin <peda@...ntia.se>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
CC:     "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] i2c: mux: pinctrl: use flexible-array member and
 struct_size() helper

On 2019-06-03 16:53, Gustavo A. R. Silva wrote:
> Update the code to use a flexible array member instead of a pointer in
> structure i2c_mux_pinctrl and use the struct_size() helper.
> 
> Also, 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 the following form:
> 
> sizeof(*mux) + num_names * sizeof(*mux->states)
> 
> with:
> 
> struct_size(mux, states, num_names)
> 
> This code was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

Thanks, patch applied to i2c-mux/for-next

Cheers,
Peter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ