diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-22 15:14:46 -0700 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-06-22 22:45:41 +0000 |
commit | 7db3021f5966a84443426e2b6e56a68b05ecd483 (patch) | |
tree | dad70cfb82d4b876011c6d97dacebe9c1932e834 /epan/dissectors/packet-ieee80211.c | |
parent | e34e6c6fc06fd95b4f42ca2d230aaa743387e1bb (diff) |
IEEE 802.11: add an expert info when tag length value is bigger than remaining payload
Bug: 11298
Change-Id: I18082a15fbeaa843099741511292eec19acf94b9
Reviewed-on: https://code.wireshark.org/review/9033
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ieee80211.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 319c27f8ea..5c97e76760 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -13973,6 +13973,10 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset ti_tag = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, ENC_BIG_ENDIAN); ti_len = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len); + if (tag_len > (guint)tvb_reported_length_remaining(tvb, offset)) { + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, + "Tag Length is longer than remaining payload"); + } switch (tag_no) { case TAG_SSID: |