mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20577 from Teufelchen1/fix/eddystone
ble/skald: Always enforce URL length check
This commit is contained in:
commit
d708f8d0b2
@ -96,7 +96,10 @@ void skald_eddystone_url_adv(skald_ctx_t *ctx,
|
||||
{
|
||||
assert(url && ctx);
|
||||
size_t len = strlen(url);
|
||||
assert(len <= (NETDEV_BLE_PDU_MAXLEN - (URL_HDR_LEN + PREAMBLE_LEN)));
|
||||
if (len <= (NETDEV_BLE_PDU_MAXLEN - (URL_HDR_LEN + PREAMBLE_LEN))) {
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
eddy_url_t *pdu = (eddy_url_t *)ctx->pkt.pdu;
|
||||
_init_pre(&pdu->pre, EDDYSTONE_URL, (URL_HDR_LEN + len));
|
||||
|
Loading…
Reference in New Issue
Block a user