Commit beca16bd authored by Jelle De Vleeschouwer's avatar Jelle De Vleeschouwer

[IEEE802.15.4] - headroom fix of memory corruption

parent 976b90c2
......@@ -417,8 +417,8 @@ addr_802154_iid(uint8_t iid[8], union pico_ll_addr *addr)
static struct pico_frame *
pico_frame_alloc_with_headroom(uint16_t size, uint16_t headroom, uint16_t overhead)
{
int network_offset = (((headroom + overhead) >> 3) + 1) << 3; // Sufficient headroom for alignment
struct pico_frame *f = pico_frame_alloc((uint32_t)(size + headroom + overhead));
int network_offset = (((headroom + overhead) >> 2) + 1) << 2; // Sufficient headroom for alignment
struct pico_frame *f = pico_frame_alloc((uint32_t)(size + network_offset));
if (!f)
return NULL;
......
......@@ -477,8 +477,8 @@ struct pico_device *pico_radiotest_create(uint8_t addr, uint8_t area0, uint8_t a
}
if (dump) {
// dbg("Dump: %s\n", dump);
// radiotest_pcap_open(radio, dump);
dbg("Dump: %s\n", dump);
radiotest_pcap_open(radio, dump);
}
return (struct pico_device *)lp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment