1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/nimble: Ignore bogus adv. during scan

This commit is contained in:
Teufelchen1 2024-04-08 13:52:17 +02:00
parent 8bb8c5be20
commit cc88e0d41f

View File

@ -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);