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

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

Revert "Fix a few OOB bugs in StartAdvertisingSet"

This reverts commit 139e5f5c.

Reason for revert: regression reported in b/296161856

Change-Id: Ifc316be5ce44157ddd4b62198525a818e9955cbe
parent 139e5f5c
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -192,11 +192,6 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
    while (offset < advertise_data.size()) {
      GapData gap_data;
      uint8_t len = advertise_data[offset];

      if (offset + len + 1 >= advertise_data.size()) {
        break;
      }

      auto begin = advertise_data.begin() + offset;
      auto end = begin + len + 1;  // 1 byte for len
      auto data_copy = std::make_shared<std::vector<uint8_t>>(begin, end);
@@ -211,11 +206,6 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
    while (offset < scan_response_data.size()) {
      GapData gap_data;
      uint8_t len = scan_response_data[offset];

      if (offset + len + 1 >= scan_response_data.size()) {
        break;
      }

      auto begin = scan_response_data.begin() + offset;
      auto end = begin + len + 1;  // 1 byte for len
      auto data_copy = std::make_shared<std::vector<uint8_t>>(begin, end);
@@ -230,11 +220,6 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
    while (offset < periodic_data.size()) {
      GapData gap_data;
      uint8_t len = periodic_data[offset];

      if (offset + len + 1 >= periodic_data.size()) {
        break;
      }

      auto begin = periodic_data.begin() + offset;
      auto end = begin + len + 1;  // 1 byte for len
      auto data_copy = std::make_shared<std::vector<uint8_t>>(begin, end);