History

Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result with RSSI event

This uses skb_pull_data to check the Inquiry Result with RSSI events received have the minimum required length.

Luiz Augusto von Dentz committed 4 years ago

Commit 8d08d321 parent 27d9eb42 files · +33 −19Browse files

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

Unified · Split

include/net/bluetooth/hci.h+10−2
@@ -2194,7 +2194,7 @@ struct hci_ev_pscan_rep_mode { · 2193 unmodified lines
2194} __packed;2194} __packed;
2195 2195
2196#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x222196#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22
2197struct inquiry_info_with_rssi {2197struct inquiry_info_rssi {
2198 bdaddr_t bdaddr;2198 bdaddr_t bdaddr;
2199 __u8 pscan_rep_mode;2199 __u8 pscan_rep_mode;
2200 __u8 pscan_period_mode;2200 __u8 pscan_period_mode;
@@ -2202,7 +2202,7 @@ struct inquiry_info_with_rssi { · 1 unmodified line
2202 __le16 clock_offset;2202 __le16 clock_offset;
2203 __s8 rssi;2203 __s8 rssi;
2204} __packed;2204} __packed;
2205struct inquiry_info_with_rssi_and_pscan_mode {2205struct inquiry_info_rssi_pscan {
2206 bdaddr_t bdaddr;2206 bdaddr_t bdaddr;
2207 __u8 pscan_rep_mode;2207 __u8 pscan_rep_mode;
2208 __u8 pscan_period_mode;2208 __u8 pscan_period_mode;
@@ -2211,6 +2211,14 @@ struct inquiry_info_with_rssi_and_pscan_mode { · 2 unmodified lines
2211 __le16 clock_offset;2211 __le16 clock_offset;
2212 __s8 rssi;2212 __s8 rssi;
2213} __packed;2213} __packed;
2214struct hci_ev_inquiry_result_rssi {
2215 __u8 num;
2216 struct inquiry_info_rssi info[];
2217} __packed;
2218struct hci_ev_inquiry_result_rssi_pscan {
2219 __u8 num;
2220 struct inquiry_info_rssi_pscan info[];
2221} __packed;
2214 2222
2215#define HCI_EV_REMOTE_EXT_FEATURES 0x232223#define HCI_EV_REMOTE_EXT_FEATURES 0x23
2216struct hci_ev_remote_ext_features {2224struct hci_ev_remote_ext_features {

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