aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtpv2.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r--epan/dissectors/packet-gtpv2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 819633e493..1c03b4943f 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -1461,7 +1461,7 @@ dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
name_len = tvb_get_guint8(tvb, offset);
if (name_len < 0x20) {
- apn = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, length - 1);
+ apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 1, ENC_ASCII);
for (;;) {
if (name_len >= length - 1)
break;
@@ -1470,7 +1470,7 @@ dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
apn[tmp] = '.';
}
} else{
- apn = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
+ apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
}
proto_tree_add_string(tree, hf_gtpv2_apn, tvb, offset, length, apn);
}
@@ -4474,7 +4474,7 @@ dissect_gtpv2_fqdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
name_len = tvb_get_guint8(tvb, offset);
if (name_len < 0x20) {
- fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset + 1, length - 1);
+ fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, length - 1, ENC_ASCII);
for (;;) {
if (name_len >= length - 1)
break;
@@ -4483,7 +4483,7 @@ dissect_gtpv2_fqdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
fqdn[tmp] = '.';
}
} else {
- fqdn = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
+ fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
}
proto_tree_add_string(tree, hf_gtpv2_fqdn, tvb, offset, length, fqdn);
proto_item_append_text(item, "%s", fqdn);