Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc_sixlowpan: Various hardening fixes [backport 2022.10] #18820

Merged
gnrc_sixlowpan_iphc: fix packet type confusion in _iphc_encode()
(cherry picked from commit 4a081f8)
  • Loading branch information
miri64 committed Oct 29, 2022
commit dafc397fdc3655aeb5c7b9963a43f1604c6a2062
Expand Up @@ -1613,16 +1613,7 @@ static gnrc_pktsnip_t *_iphc_encode(gnrc_pktsnip_t *pkt,
else {
dispatch->next = ptr;
}
if (ptr->type == GNRC_NETTYPE_UNDEF) {
/* most likely UDP for now so use that (XXX: extend if extension
* headers make problems) */
dispatch_size += sizeof(udp_hdr_t);
break; /* nothing special after UDP so quit even if more UNDEF
* come */
}
else {
dispatch_size += ptr->size;
}
dispatch_size += ptr->size;
dispatch = ptr; /* use dispatch as temporary point for prev */
ptr = ptr->next;
}
Expand Down