diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-05-13 22:33:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-21 15:05:27 +0300 |
commit | 106133dacc001e4e3a7ebcdb96368f523bf44a89 (patch) | |
tree | e6b6920b26eff5607f57e44793841b1dc887ce6a /drivers/usb/core/hub.c | |
parent | 53ad92fdf7c34c3b44566553077176a767612454 (diff) | |
download | linux-106133dacc001e4e3a7ebcdb96368f523bf44a89.tar.xz |
usb: gadget: s3c-hsudc: Use struct_size() in devm_kzalloc()
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.
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210513193353.GA196565@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
0 files changed, 0 insertions, 0 deletions