summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Sauter <sauter@locoslab.com>2017-06-02 08:04:50 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2017-06-02 15:32:27 +0000
commita86f6603fc8b66a46ce21d18990f2058110acf27 (patch)
treef943232c626bef1ea3d5cdc1cfe192b1fc708677
parenta9a3bfa331164fd05f392c84c0f7e9a3a909ebfd (diff)
downloadwireshark-a86f6603fc8b66a46ce21d18990f2058110acf27.tar.gz
IEEE 802.15.4: add missing increments for Header IEs
Add missing offset increment for Header IEs with length (missing from https://code.wireshark.org/review/21472). Add missing increment so that the overall header tree spans all elements. Change-Id: I91515a0b6b5fca8bcc95ea9e2cbc791bddf0500d Reviewed-on: https://code.wireshark.org/review/21890 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-ieee802154.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 454607a7a5..21293a7ffb 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -2470,10 +2470,10 @@ dissect_ieee802154_header_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
header_ie = tvb_get_letohs(tvb, *offset);
id = (guint16) ((header_ie & IEEE802154_HEADER_IE_ID_MASK) >> 7);
length = (guint16) (header_ie & IEEE802154_HEADER_IE_LENGTH_MASK);
+ header_length += 2 + length;
/* until the Header IEs are finalized, just use the data dissector */
if (length > 0) {
- header_length += length;
subtree = proto_item_add_subtree(header_item, ett_ieee802154_header);
proto_item_append_text(subtree, ", Element ID: %s, Length: %d", val_to_str_const(id, ieee802154_header_ie_names, "Unknown IE"), length);
proto_tree_add_bitmask(subtree, tvb, *offset, hf_ieee802154_header_ie_tlv, ett_ieee802154_header_ie, fields, ENC_LITTLE_ENDIAN);
@@ -2549,6 +2549,7 @@ dissect_ieee802154_header_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
expert_add_info(pinfo, header_item, &ei_ieee802154_unsupported_element_id);
break;
}
+ *offset += length;
} else {
// Header IE of empty length
switch(id){