Skip to content

Commit

Permalink
pkg/nimble: Ignore bogus adv. during scan
Browse files Browse the repository at this point in the history
  • Loading branch information
Teufelchen1 committed Apr 8, 2024
1 parent 8bb8c5b commit cc88e0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/nimble/scanlist/nimble_scanlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ void nimble_scanlist_update(uint8_t type, const ble_addr_t *addr,
const uint8_t *ad, size_t len)
{
assert(addr);
assert(len <= BLE_ADV_PDU_LEN);

/* Ignore bogus advertisements */
if (len > BLE_ADV_PDU_LEN) {
assert(0);
return;
}

uint32_t now = (uint32_t)ztimer_now(ZTIMER_USEC);
nimble_scanlist_entry_t *e = _find(addr);
Expand Down

0 comments on commit cc88e0d

Please sign in to comment.