diff --git a/pkg/nimble/scanlist/nimble_scanlist.c b/pkg/nimble/scanlist/nimble_scanlist.c index e8674ecb448a..773fc7987688 100644 --- a/pkg/nimble/scanlist/nimble_scanlist.c +++ b/pkg/nimble/scanlist/nimble_scanlist.c @@ -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);