Messages in this thread | | | Subject | Re: [PATCH][next] usb: xhci-mtk: Use struct_size() helper in create_sch_ep() | From | AngeloGioacchino Del Regno <> | Date | Mon, 24 Jan 2022 10:26:18 +0100 |
| |
Il 20/01/22 02:55, Gustavo A. R. Silva ha scritto: > 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 worst scenario, could lead to heap overflows. > > Also, address the following sparse warnings: > drivers/usb/host/xhci-mtk-sch.c:265:20: warning: using sizeof on a flexible structure > > Link: https://github.com/KSPP/linux/issues/160 > Link: https://github.com/KSPP/linux/issues/174 > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
| |