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

gnrc_sixlowpan_iphc: zero IPv6 header before decompressing into it

This commit is contained in:
Martine S. Lenders 2020-03-25 14:54:18 +01:00
parent c4a8c63002
commit ac222521ab
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -158,6 +158,9 @@ static size_t _iphc_ipv6_decode(const uint8_t *iphc_hdr,
payload_offset++;
}
/* bits of the uncompressed address might not be written in decompression,
* so zero the whole header first */
memset(ipv6_hdr, 0, sizeof(*ipv6_hdr));
ipv6_hdr_set_version(ipv6_hdr);
switch (iphc_hdr[IPHC1_IDX] & SIXLOWPAN_IPHC1_TF) {