1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

ieee802154/submac: handle write of NULL buffer

tests/socket_zep tests for this condition, so we better handle it
gracefully instead of crashing.
This commit is contained in:
Benjamin Valentin 2021-10-06 23:25:59 +02:00
parent 558010e8eb
commit 17fdf61cbe

View File

@ -406,6 +406,10 @@ int ieee802154_send(ieee802154_submac_t *submac, const iolist_t *iolist)
return -EBUSY;
}
if (iolist == NULL) {
return 0;
}
uint8_t *buf = iolist->iol_base;
bool cnf = buf[0] & IEEE802154_FCF_ACK_REQ;