1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_sixlowpan_iphc: check IPHC dispatch for truncation

This commit is contained in:
Martine Lenders 2022-12-23 13:06:11 +01:00 committed by Kaspar Schleiser
parent fcc07a5248
commit 709ddd2ba7

View File

@ -734,6 +734,14 @@ void gnrc_sixlowpan_iphc_recv(gnrc_pktsnip_t *sixlo, void *rbuf_ptr,
gnrc_sixlowpan_frag_vrb_t *vrbe = NULL;
#endif /* MODULE_GNRC_SIXLOWPAN_FRAG_VRB */
if (sixlo->size < 2U) {
DEBUG("6lo iphc: IPHC header truncated\n");
if (rbuf != NULL) {
gnrc_sixlowpan_frag_rb_remove(rbuf);
}
gnrc_pktbuf_release(sixlo);
return;
}
if (rbuf != NULL) {
ipv6 = rbuf->pkt;
assert(ipv6 != NULL);