Re: [PATCH v2 2/2] USB: serial: garmin_gps: use struct_size to allocate pkt

From: Kees Cook
Date: Wed Jun 19 2024 - 16:34:02 EST


On Wed, Jun 19, 2024 at 09:42:45PM +0200, Javier Carrasco wrote:
> Use the struct_size macro to calculate the size of the pkt, which
> includes a trailing flexible array.
>
> Suggested-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>

Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook