system/bt
Révision | 12878c73d7c8fd8c5543709d8b38a91e565ad1fc (tree) |
---|---|
l'heure | 2019-12-21 02:34:57 |
Auteur | Hansong Zhang <hsz@goog...> |
Commiter | Bryan Ferris |
VSC batch scan: Check packet length
Bug: 142543524
Test: POC
Merged-In: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4
Change-Id: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4
@@ -63,6 +63,7 @@ void btm_ble_batchscan_filter_track_adv_vse_cback(uint8_t len, uint8_t* p) { | ||
63 | 63 | |
64 | 64 | uint8_t sub_event = 0; |
65 | 65 | tBTM_BLE_VSC_CB cmn_ble_vsc_cb; |
66 | + if (len == 0) return; | |
66 | 67 | STREAM_TO_UINT8(sub_event, p); |
67 | 68 | |
68 | 69 | BTM_TRACE_EVENT( |
@@ -90,6 +91,7 @@ void btm_ble_batchscan_filter_track_adv_vse_cback(uint8_t len, uint8_t* p) { | ||
90 | 91 | |
91 | 92 | /* Extract the adv info details */ |
92 | 93 | if (ADV_INFO_PRESENT == adv_data.advertiser_info_present) { |
94 | + if (len < 15) return; | |
93 | 95 | STREAM_TO_UINT8(adv_data.tx_power, p); |
94 | 96 | STREAM_TO_UINT8(adv_data.rssi_value, p); |
95 | 97 | STREAM_TO_UINT16(adv_data.time_stamp, p); |