aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sua.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@wireshark.org>2014-07-17 20:50:59 +0200
committerMichael Tüxen <tuexen@wireshark.org>2014-07-17 23:47:03 +0000
commit3e7ed3da2c8311a3af83ab5bb84311486ee115fa (patch)
treebb5a5ea18566fd575d09dc7d49dc778a41a4999e /epan/dissectors/packet-sua.c
parente05a884740c52597a9cd93107ee2eb05a3d1f75c (diff)
Escape some characters like \n when appending text
This patch escapes some characters like \n when showing text contained in a packet by appending it to a protocol item. Change-Id: Ice0040040ec7ab573dd9a412f8c0c197a566a031 Reviewed-on: https://code.wireshark.org/review/3095 Petri-Dish: Michael Tüxen <tuexen@wireshark.org> Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Diffstat (limited to 'epan/dissectors/packet-sua.c')
-rw-r--r--epan/dissectors/packet-sua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index ea9642002d..ca4e3fed9e 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -599,7 +599,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto
proto_tree_add_item(parameter_tree, hf_sua_info_string, parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_UTF_8|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
- tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_UTF_8|ENC_NA));
+ tvb_format_text(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define ROUTING_CONTEXT_LENGTH 4
@@ -1505,7 +1505,7 @@ dissect_hostname_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree,
hostname_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
proto_tree_add_item(parameter_tree, source ? hf_sua_source_hostname : hf_sua_dest_hostname, parameter_tvb, HOSTNAME_OFFSET, hostname_length, ENC_ASCII|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", hostname_length,
- tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, HOSTNAME_OFFSET, hostname_length, ENC_ASCII));
+ tvb_format_text(parameter_tvb, HOSTNAME_OFFSET, hostname_length));
}
#define IPV6_ADDRESS_LENGTH 16