aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-dcerpc-fileexp.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/epan/dissectors/packet-dcerpc-fileexp.c b/epan/dissectors/packet-dcerpc-fileexp.c
index 01330dc824..cd31317ad3 100644
--- a/epan/dissectors/packet-dcerpc-fileexp.c
+++ b/epan/dissectors/packet-dcerpc-fileexp.c
@@ -603,10 +603,8 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
if (string_size < AFS_NAMEMAX)
{
-/* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
-
- proto_tree_add_string (tree, hf_fileexp_afsNameString_t_principalName_string, tvb, offset, string_size, tvb_get_ptr (tvb, offset, string_size));
- namestring = tvb_get_ptr (tvb, offset, string_size);
+ proto_tree_add_item (tree, hf_fileexp_afsNameString_t_principalName_string, tvb, offset, string_size, ENC_NA);
+ namestring = tvb_get_ephemeral_string (tvb, offset, string_size);
offset += string_size;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
@@ -793,11 +791,9 @@ dissect_afsTaggedPath (tvbuff_t * tvb, int offset,
offset =
dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
hf_fileexp_afsTaggedPath_tp_length, &tp_length);
- proto_tree_add_string (tree, hf_fileexp_afsTaggedPath_tp_chars, tvb, offset,
- hf_fileexp_afsTaggedPath_tp_length, tvb_get_ptr (tvb,
- offset,
- tp_length));
- tp_chars = tvb_get_ptr (tvb, offset, 1025);
+ proto_tree_add_item (tree, hf_fileexp_afsTaggedPath_tp_chars, tvb, offset,
+ tp_length, ENC_NA);
+ tp_chars = tvb_get_ephemeral_string (tvb, offset, 1025);
offset += 1025;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " :tp_chars %s", tp_chars);
@@ -1375,10 +1371,9 @@ dissect_afstaggedname (tvbuff_t * tvb, int offset,
&tn_length);
if (tn_length < 254)
{
- proto_tree_add_string (tree, hf_fileexp_tn_string, tvb, offset,
- hf_fileexp_tn_size, tvb_get_ptr (tvb, offset,
- tn_length));
- tn_string = tvb_get_ptr (tvb, offset, 257);
+ proto_tree_add_item (tree, hf_fileexp_tn_string, tvb, offset,
+ tn_length, ENC_NA);
+ tn_string = tvb_get_ephemeral_string (tvb, offset, 257);
offset += 257;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " :tn_tag: %s", tn_string);