aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-ieee80211.c')
-rw-r--r--epan/dissectors/packet-ieee80211.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 2b6e8ebcfd..37cb8f79b9 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -6230,13 +6230,13 @@ static const value_string nai_realm_auth_param_id_vals[] = {
static void
dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
{
- guint16 count, len;
- proto_item *item, *r_item;
- int f_end, eap_end;
- guint8 nai_len, eap_count, eap_len, auth_param_count, auth_param_len;
- guint8 auth_param_id;
- proto_tree *realm_tree, *eap_tree;
- guint8 *realm;
+ guint16 count, len;
+ proto_item *item, *r_item;
+ int f_end, eap_end;
+ guint8 nai_len, eap_count, eap_len, auth_param_count, auth_param_len;
+ guint8 auth_param_id;
+ proto_tree *realm_tree, *eap_tree;
+ const guint8 *realm;
count = tvb_get_letohs(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_ff_anqp_nai_realm_count,
@@ -6267,9 +6267,8 @@ dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
"Invalid NAI Realm Data");
break;
}
- proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_realm,
- tvb, offset, nai_len, ENC_ASCII|ENC_NA);
- realm = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, nai_len, ENC_ASCII);
+ proto_tree_add_item_ret_string(realm_tree, hf_ieee80211_ff_anqp_nai_realm,
+ tvb, offset, nai_len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &realm);
if (realm) {
proto_item_append_text(r_item, " (%s)", realm);
}
@@ -10596,6 +10595,7 @@ dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
tvbuff_t *tvb, int offset, guint32 tag_len)
{
guint8 type;
+ const guint8* name;
offset += 1; /* VS OUI Type */
tag_len -= 1;
@@ -10611,9 +10611,9 @@ dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
offset += 1;
tag_len -= 1;
- proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_apname, tvb,
- offset, tag_len, ENC_ASCII|ENC_NA);
- proto_item_append_text(item, " (%s)", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII));
+ proto_tree_add_item_ret_string(ietree, hf_ieee80211_vs_aruba_apname, tvb,
+ offset, tag_len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &name);
+ proto_item_append_text(item, " (%s)", name);
break;
default:
@@ -13853,6 +13853,7 @@ ieee80211_tag_country_info(packet_info *pinfo, proto_tree *tree,
/* 7.3.2.9 Country information element (7) */
proto_tree *sub_tree;
proto_item *sub_item;
+ const guint8* country_code;
if (tag_len < 6) {
expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
@@ -13862,10 +13863,9 @@ ieee80211_tag_country_info(packet_info *pinfo, proto_tree *tree,
offset += 2;
- proto_tree_add_item(tree, hf_ieee80211_tag_country_info_code,
- tvb, offset, 2, ENC_ASCII|ENC_NA);
- proto_item_append_text(ti, ": Country Code %s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 2, ENC_ASCII));
+ proto_tree_add_item_ret_string(tree, hf_ieee80211_tag_country_info_code,
+ tvb, offset, 2, ENC_ASCII|ENC_NA, wmem_packet_scope(), &country_code);
+ proto_item_append_text(ti, ": Country Code %s", country_code);
offset += 2;
proto_tree_add_item(tree, hf_ieee80211_tag_country_info_env,
@@ -15527,12 +15527,13 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
case TAG_MESH_ID:
{
+ const guint8* mesh_id;
offset += 2;
- proto_tree_add_item(tree, hf_ieee80211_mesh_id, tvb, offset, tag_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item_ret_string(tree, hf_ieee80211_mesh_id, tvb, offset, tag_len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &mesh_id);
if (tag_len > 0) {
- col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", format_text(tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII), tag_len));
- proto_item_append_text(ti, ": %s", format_text(tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tag_len, ENC_ASCII), tag_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", format_text(mesh_id, tag_len));
+ proto_item_append_text(ti, ": %s", format_text(mesh_id, tag_len));
}
break;