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

Merge pull request #5360 from authmillenon/gnrc_sixlowpan_iphc/fix/signage

gnrc_sixlowpan_iphc: fix comparison signage
This commit is contained in:
Kaspar Schleiser 2016-04-20 10:59:56 +02:00
commit 01650a4460

View File

@ -566,7 +566,7 @@ inline static size_t iphc_nhc_udp_encode(gnrc_pktsnip_t *udp, ipv6_hdr_t *ipv6_h
if (udp->type == GNRC_NETTYPE_IPV6) {
/* forwarded ipv6 packet */
size_t diff = sizeof(udp_hdr_t) - nhc_len;
for (int i = nhc_len; i < (udp->size - diff); i++) {
for (size_t i = nhc_len; i < (udp->size - diff); i++) {
udp_data[i] = udp_data[i + diff];
}
/* NOTE: gnrc_pktbuf_realloc_data overflow if (udp->size - diff) < 4 */