diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-10-08 16:13:53 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-10-08 16:13:53 +0000 |
commit | 6645d6e47dfc0c1a81cda67dcf0b094b7839605c (patch) | |
tree | 390ca56076d17e60f3aa7a8243bad50af22627ef | |
parent | ad7042d2a43710ac62e4f6dfe472caa16af1e0fe (diff) | |
download | wireshark-6645d6e47dfc0c1a81cda67dcf0b094b7839605c.tar.gz wireshark-6645d6e47dfc0c1a81cda67dcf0b094b7839605c.tar.bz2 wireshark-6645d6e47dfc0c1a81cda67dcf0b094b7839605c.zip |
Fix code so it actually pads a length to an 8 byte boundary.
svn path=/trunk/; revision=30406
-rw-r--r-- | epan/dissectors/packet-6lowpan.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |