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

Commit b711495a 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

Change-Id: Ib24e031ef6f4573286e8ccb16153ae5f002b8d16
parents 4ddac4f2 cc9d4c37
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];
  }