aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipx.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 03:57:12 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 03:57:12 +0000
commit61876001c35547972282a50854957c7c4deaaccf (patch)
tree7f20cb0372c55d80a8f833d862d6cfd13a3c6a1e /epan/dissectors/packet-ipx.c
parentd553df218ebcb9e76299592b0794f0553ed63ff7 (diff)
Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated. There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). svn path=/trunk/; revision=35548
Diffstat (limited to 'epan/dissectors/packet-ipx.c')
-rw-r--r--epan/dissectors/packet-ipx.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c
index eab75095e6..4eb1cb35cf 100644
--- a/epan/dissectors/packet-ipx.c
+++ b/epan/dissectors/packet-ipx.c
@@ -247,7 +247,6 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *str;
guint16 first_socket, second_socket;
guint32 ipx_snet, ipx_dnet;
- const guint8 *ipx_snode, *ipx_dnode;
static ipxhdr_t ipxh_arr[4];
static int ipx_current=0;
ipxhdr_t *ipxh;
@@ -321,11 +320,8 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hidden_item = proto_tree_add_ipxnet(ipx_tree, hf_ipx_net, tvb, 6, 4,
ipx_dnet);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- ipx_dnode = tvb_get_ptr(tvb, 10, 6);
- proto_tree_add_ether(ipx_tree, hf_ipx_dnode, tvb, 10, 6,
- ipx_dnode);
- hidden_item = proto_tree_add_ether(ipx_tree, hf_ipx_node, tvb, 10, 6,
- ipx_dnode);
+ proto_tree_add_item(ipx_tree, hf_ipx_dnode, tvb, 10, 6, ENC_NA);
+ hidden_item = proto_tree_add_item(ipx_tree, hf_ipx_node, tvb, 10, 6, ENC_NA);
PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(ipx_tree, hf_ipx_dsocket, tvb, 16, 2,
ipxh->ipx_dsocket);
@@ -340,11 +336,8 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hidden_item = proto_tree_add_ipxnet(ipx_tree, hf_ipx_net, tvb, 18, 4,
ipx_snet);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- ipx_snode = tvb_get_ptr(tvb, 22, 6);
- proto_tree_add_ether(ipx_tree, hf_ipx_snode, tvb, 22, 6,
- ipx_snode);
- hidden_item = proto_tree_add_ether(ipx_tree, hf_ipx_node, tvb, 22, 6,
- ipx_snode);
+ proto_tree_add_item(ipx_tree, hf_ipx_snode, tvb, 22, 6, ENC_NA);
+ hidden_item = proto_tree_add_item(ipx_tree, hf_ipx_node, tvb, 22, 6, ENC_NA);
PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(ipx_tree, hf_ipx_ssocket, tvb, 28, 2,
ipxh->ipx_ssocket);