Skip to content

Commit

Permalink
Merge pull request #20555 from Teufelchen1/fix/nimble
Browse files Browse the repository at this point in the history
pkg/nimble: Ignore bogus adv. during scan
  • Loading branch information
Teufelchen1 authored Apr 8, 2024
2 parents e6bd633 + cc88e0d commit 9f3786e
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 9f3786e

Please sign in to comment.