Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2166e96 authored by Hui Peng's avatar Hui Peng Committed by Android (Google) Code Review
Browse files

Merge "Fix a potential OOB in...

Merge "Fix a potential OOB in BleAdvertiserVscHciInterfaceImpl::VendorSpecificEventCback" into tm-dev
parents 68569357 112ce0e5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -294,10 +294,14 @@ class BleAdvertiserVscHciInterfaceImpl : public BleAdvertiserHciInterface {
    uint8_t sub_event, adv_inst, change_reason;
    uint16_t conn_handle;

    if (length < 1) {
      return;
    }

    STREAM_TO_UINT8(sub_event, p);
    length--;

    if (sub_event != HCI_VSE_SUBCODE_BLE_MULTI_ADV_ST_CHG || length != 4) {
    if (sub_event != HCI_VSE_SUBCODE_BLE_MULTI_ADV_ST_CHG || length < 4) {
      return;
    }