Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_conn: Use struct_size() in hci_le_big_create_sync()

Use struct_size() instead of the open-coded version. Similarly to
this other patch[1].

Link: https://lore.kernel.org/linux-hardening/ZiwwPmCvU25YzWek@neat/ [1]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Gustavo A. R. Silva and committed by
Luiz Augusto von Dentz
d6bb8782 4322502f

+1 -1
+1 -1
net/bluetooth/hci_conn.c
··· 2132 2132 memcpy(pdu->bis, bis, num_bis); 2133 2133 2134 2134 return hci_send_cmd(hdev, HCI_OP_LE_BIG_CREATE_SYNC, 2135 - sizeof(*pdu) + num_bis, pdu); 2135 + struct_size(pdu, bis, num_bis), pdu); 2136 2136 } 2137 2137 2138 2138 static void create_big_complete(struct hci_dev *hdev, void *data, int err)