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:
parent
c4a8c63002
commit
ac222521ab
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user