diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-23 20:11:19 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-25 05:57:17 +0000 |
commit | 53deb521e79f8266661cd87b1771b4414445f098 (patch) | |
tree | 54299a3ba87c93e9ddc7c53ee47555ecf8880f13 /epan/dissectors | |
parent | 57048843e9393222241f5f3dc897875fe1a9dcd5 (diff) |
Neighbor report (802.11k) may be have no subelement (len == 13)
Fix some malformed frame from sample on Bug 9724
Change-Id: I0874c2aab57799426f13e18123b05a7e73c6a75f
Partialy-Bug:9724
Reviewed-on: https://code.wireshark.org/review/340
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index d414ba8167..4e279f9736 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -13218,6 +13218,11 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_phy_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; + + /* The Optional Subelements field format contains zero or more subelements */ + if (tag_len == 13){ /* tag_len == 13 => no Subelements */ + break; + } sub_tag_id = tvb_get_guint8 (tvb, offset); offset += 1; sub_tag_length = tvb_get_guint8 (tvb, offset); |