History

Bluetooth: HCI: Use skb_pull_data to parse LE Advertising Report event

This uses skb_pull_data to check the LE Advertising Report events received have the minimum required length.

Luiz Augusto von Dentz committed 4 years ago

Commit 47afe931 parent 12cfe412 files · +30 −16Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/net/bluetooth/hci.h+6−1
@@ -2445,13 +2445,18 @@ struct hci_ev_le_conn_complete { · 2444 unmodified lines
24452445
24462446 #define HCI_EV_LE_ADVERTISING_REPORT 0x02
24472447 struct hci_ev_le_advertising_info {
2448− __u8 evt_type;
2448+ __u8 type;
24492449 __u8 bdaddr_type;
24502450 bdaddr_t bdaddr;
24512451 __u8 length;
24522452 __u8 data[];
24532453 } __packed;
24542454
2455+struct hci_ev_le_advertising_report {
2456+ __u8 num;
2457+ struct hci_ev_le_advertising_info info[];
2458+} __packed;
2459+
24552460 #define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03
24562461 struct hci_ev_le_conn_update_complete {
24572462 __u8 status;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t