Closed jnohlgard closed 6 years ago
Avoids a hard fault when using the latest RIOT master where raw mode does not provide a netif header.
The sniffer application works without this PR on samr21-xpro, but only because of luck. https://github.com/RIOT-OS/applications/blob/39a974efcae7161b0b319972a55b3d60c171076a/sniffer/main.c#L61 pkt->next is NULL and the pktbuf_remove call causes an indirect write: pkt->next->next = NULL;
pkt->next
pkt->next->next = NULL;
On frdm-kw41z (with RIOT-OS/RIOT#7107) the null pointer write causes a hard fault
for reference, here is the called function where the write happens: https://github.com/RIOT-OS/RIOT/blob/f139dfdad2c81f239e27e2be86a7857e740dc201/sys/net/gnrc/pktbuf/gnrc_pktbuf.c#L54-L62
Avoids a hard fault when using the latest RIOT master where raw mode does not provide a netif header.
The sniffer application works without this PR on samr21-xpro, but only because of luck. https://github.com/RIOT-OS/applications/blob/39a974efcae7161b0b319972a55b3d60c171076a/sniffer/main.c#L61
pkt->next
is NULL and the pktbuf_remove call causes an indirect write:pkt->next->next = NULL;
On frdm-kw41z (with RIOT-OS/RIOT#7107) the null pointer write causes a hard fault
for reference, here is the called function where the write happens: https://github.com/RIOT-OS/RIOT/blob/f139dfdad2c81f239e27e2be86a7857e740dc201/sys/net/gnrc/pktbuf/gnrc_pktbuf.c#L54-L62