lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][next] usb: gadget: s3c-hsudc: Use struct_size() in devm_kzalloc()
Date
"Gustavo A. R. Silva" <gustavoars@kernel.org> 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@kernel.org>

Acked-by: Felipe Balbi <balbi@kernel.org>

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-05-14 09:26    [W:0.027 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site