Re: [PATCH][next] usb: gadget: s3c-hsudc: Use struct_size() in devm_kzalloc()

From: Felipe Balbi
Date: Fri May 14 2021 - 03:25:04 EST


"Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx> writes:

> Make use of the struct_size() helper instead of an open-coded version,
> in order to avoid any potential type mistakes or integer overflows
> that, in the worse scenario, could lead to heap overflows.
>
> This code was detected with the help of Coccinelle and, audited and
> fixed manually.
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

Acked-by: Felipe Balbi <balbi@xxxxxxxxxx>

--
balbi

Attachment: signature.asc
Description: PGP signature