mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
Bluetooth: Annotate struct hci_drv_rp_read_info with __counted_by_le()
Add the __counted_by_le() compiler attribute to the flexible array member 'supported_commands' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
3e94262921
commit
d4e99db3d9
|
|
@ -47,7 +47,7 @@ struct hci_drv_ev_cmd_complete {
|
|||
struct hci_drv_rp_read_info {
|
||||
__u8 driver_name[HCI_DRV_MAX_DRIVER_NAME_LENGTH];
|
||||
__le16 num_supported_commands;
|
||||
__le16 supported_commands[];
|
||||
__le16 supported_commands[] __counted_by_le(num_supported_commands);
|
||||
} __packed;
|
||||
|
||||
/* Driver specific OGF (Opcode Group Field)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user