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

Commit f6480c8b authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Fix advertise data parsing am: ac6177ae am: b4bd8a25 am: cc9d4c37

am: b711495a

Change-Id: I60a085c5ed379a146616f77b96e914b83e2fd617
parents 0e9ce8f3 b711495a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1117,7 +1117,7 @@ const uint8_t* BTM_CheckAdvData(std::vector<uint8_t> const& adv, uint8_t type,
    return NULL;
  }

  uint8_t position = 0;
  size_t position = 0;
  uint8_t length = adv[position];

  while (length > 0 && (position < adv.size())) {
@@ -1130,6 +1130,8 @@ const uint8_t* BTM_CheckAdvData(std::vector<uint8_t> const& adv, uint8_t type,
    }

    position += length + 1; /* skip the length of data */
    if (position >= adv.size()) break;

    length = adv[position];
  }

+3 −1
Original line number Diff line number Diff line
@@ -2318,7 +2318,7 @@ uint8_t* BTM_CheckEirData(uint8_t* p_eir, size_t eir_len, uint8_t type,
    return NULL;
  }

  uint8_t position = 0;
  size_t position = 0;
  uint8_t length = p_eir[position];

  while (length > 0 && (position < eir_len)) {
@@ -2331,6 +2331,8 @@ uint8_t* BTM_CheckEirData(uint8_t* p_eir, size_t eir_len, uint8_t type,
    }

    position += length + 1; /* skip the length of data */
    if (position >= eir_len) break;

    length = p_eir[position];
  }