Re: [PATCH v3] crypto: Use struct_size() helper in kmalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 18, 2022 at 02:25:18PM +0800, GUO Zihua wrote:
> Make use of struct_size() helper for structures containing flexible array
> member instead of sizeof() which prevents potential issues, as well as
> increase readability.
> 
> Reference: https://lore.kernel.org/all/CAHk-=wiGWjxs7EVUpccZEi6esvjpHJdgHQ=vtUeJ5crL62hx9A@xxxxxxxxxxxxxx/
> 
> Signed-off-by: GUO Zihua <guozihua@xxxxxxxxxx>

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

-- 
Kees Cook



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux