Re: [PATCH] soc: qcom: smem: Use struct_size()
From: Kees Cook
Date: Wed Jul 12 2023 - 18:40:43 EST
On Wed, Jul 12, 2023 at 10:42:15PM +0200, Christophe JAILLET wrote:
> Use struct_size() instead of hand-writing it, when allocating a structure
> with a flex array.
>
> This is less verbose.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook