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