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

Commit d73df393 authored by Myles Watson's avatar Myles Watson
Browse files

Use reserve for BQR data

Reserve enough space for the event and header to be reconstructed
and passed to the callbacks.  An extra byte is added for backward
compatibility until PDL is pushed farther up in the stack.

Bug: 322230000
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: Ifa7caeaeaa558520301805fa5a6631567403c608
parent b50ef041
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ void btm_vendor_specific_evt(const uint8_t* p, uint8_t evt_len) {

        uint8_t i;
        std::vector<uint8_t> reconstructed_event;
        reconstructed_event.reserve(4 + bqr_parameter_length);
        reconstructed_event[0] = HCI_VENDOR_SPECIFIC_EVT;
        reconstructed_event[1] = 3 + bqr_parameter_length;  // event size
        reconstructed_event[2] = HCI_VSE_SUBCODE_BQR_SUB_EVT;