From 6645d6e47dfc0c1a81cda67dcf0b094b7839605c Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Thu, 8 Oct 2009 16:13:53 +0000 Subject: Fix code so it actually pads a length to an 8 byte boundary. svn path=/trunk/; revision=30406 --- epan/dissectors/packet-6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index 1d8101a4ca..166e608f75 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -1516,7 +1516,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi /* Compute the length of the extension header padded to an 8-byte alignment. */ length = sizeof(struct ip6_ext) + ext_len; - length += ((length + 7) & 0x7); + length = (length + 7) & ~0x7; /* Create the next header structure for the IPv6 extension header. */ nhdr = ep_alloc0(sizeof(struct lowpan_nhdr) + sizeof(struct ip6_ext) + length); -- cgit v1.2.3