• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisión12878c73d7c8fd8c5543709d8b38a91e565ad1fc (tree)
Tiempo2019-12-21 02:34:57
AutorHansong Zhang <hsz@goog...>
CommiterBryan Ferris

Log Message

VSC batch scan: Check packet length

Bug: 142543524
Test: POC
Merged-In: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4
Change-Id: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4

Cambiar Resumen

Diferencia incremental

--- a/stack/btm/btm_ble_batchscan.cc
+++ b/stack/btm/btm_ble_batchscan.cc
@@ -63,6 +63,7 @@ void btm_ble_batchscan_filter_track_adv_vse_cback(uint8_t len, uint8_t* p) {
6363
6464 uint8_t sub_event = 0;
6565 tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
66+ if (len == 0) return;
6667 STREAM_TO_UINT8(sub_event, p);
6768
6869 BTM_TRACE_EVENT(
@@ -90,6 +91,7 @@ void btm_ble_batchscan_filter_track_adv_vse_cback(uint8_t len, uint8_t* p) {
9091
9192 /* Extract the adv info details */
9293 if (ADV_INFO_PRESENT == adv_data.advertiser_info_present) {
94+ if (len < 15) return;
9395 STREAM_TO_UINT8(adv_data.tx_power, p);
9496 STREAM_TO_UINT8(adv_data.rssi_value, p);
9597 STREAM_TO_UINT16(adv_data.time_stamp, p);