1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #3237 from haukepetersen/ng_fix_frag_sendnth_ptrcheck

net/ng_sixlowpan: fix check for pkt==NULL
This commit is contained in:
BytesGalore 2015-06-23 13:48:01 +02:00
commit 9082ffb70d

View File

@ -154,7 +154,7 @@ static uint16_t _send_nth_fragment(ng_sixlowpan_netif_t *iface, ng_pktsnip_t *pk
hdr->offset = (uint8_t)(offset >> 3);
pkt = pkt->next; /* don't copy netif header */
while ((pkt != NULL) || (offset_count == offset)) { /* go to offset */
while ((pkt != NULL) && (offset_count != offset)) { /* go to offset */
offset_count += (uint16_t)pkt->size;
if (offset_count > offset) { /* we overshot */