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

2024-06-19 Thread Kees Cook
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 > Signed-off-by: Javier Carrasco Reviewed-by: Kees Cook -- Kees Cook

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

2024-06-19 Thread Gustavo A. R. Silva
On 19/06/24 21:42, 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 Signed-off-by: Javier Carrasco Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/usb/serial/ga

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

2024-06-19 Thread Javier Carrasco
Use the struct_size macro to calculate the size of the pkt, which includes a trailing flexible array. Suggested-by: Nathan Chancellor Signed-off-by: Javier Carrasco --- drivers/usb/serial/garmin_gps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/garmi