aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-m2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-m2tp.c')
-rw-r--r--epan/dissectors/packet-m2tp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-m2tp.c b/epan/dissectors/packet-m2tp.c
index f00f08d189..1ed4e2622f 100644
--- a/epan/dissectors/packet-m2tp.c
+++ b/epan/dissectors/packet-m2tp.c
@@ -330,13 +330,12 @@ static void
dissect_m2tp_info_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
guint16 length, info_string_length;
- const char *info_string;
+ const guint8 *info_string;
if (parameter_tree) {
length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
info_string_length = length - PARAMETER_HEADER_LENGTH;
- info_string = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII);
- proto_tree_add_string(parameter_tree, hf_m2tp_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, info_string);
+ proto_tree_add_item_ret_string(parameter_tree, hf_m2tp_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII, wmem_packet_scope(), &info_string);
proto_item_set_text(parameter_item, "Info String (%.*s)", info_string_length, info_string);
}
}