aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fw1.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2007-05-08 19:11:33 +0000
committerStephen Fisher <steve@stephen-fisher.com>2007-05-08 19:11:33 +0000
commit1d114f469cac4b1fa99f77af6d5590d2b0aaa174 (patch)
treedae8012bc5c8a10cbdee0569cbd8724531bdc270 /epan/dissectors/packet-fw1.c
parent26aae8fd1278a5bee9d42a03d9d3feca64e11749 (diff)
Fix for bug #1532 -
From Kenneth Golomb: Fixes two issues: 1) interface_name is allocated iface_len+1 bytes but a buffer length of iface len is passed in when the string is copied. This truncates the string to 9 characters if the interface_name is 10 characters long. 2) interface_name added to tree with proto_tree_add_string_format and is missing the initial value parameter when called. Even if this is added the field can not be filtered on. Adding the field with proto_tree_add_item fixes both the tree display and the filtering issues. svn path=/trunk/; revision=21730
Diffstat (limited to 'epan/dissectors/packet-fw1.c')
-rw-r--r--epan/dissectors/packet-fw1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c
index d7f1fe5569..92d48a221a 100644
--- a/epan/dissectors/packet-fw1.c
+++ b/epan/dissectors/packet-fw1.c
@@ -170,7 +170,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
iface_len = 6;
interface_name=ep_alloc(iface_len+1);
- tvb_get_nstringz0(tvb, 2, iface_len, interface_name);
+ tvb_get_nstringz0(tvb, 2, iface_len+1, interface_name);
/* Known interface name - if not, remember it */
found=FALSE;
@@ -219,7 +219,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (fw1_iflist_with_chain)
proto_tree_add_item(fh_tree, hf_fw1_chain, tvb, 1, 1, FALSE);
- proto_tree_add_string_format(fh_tree, hf_fw1_interface, tvb, 2, iface_len, "Interface: %s", interface_name);
+ proto_tree_add_item(fh_tree, hf_fw1_interface, tvb, 2, iface_len, FALSE);
if (fw1_with_uuid)
proto_tree_add_item(fh_tree, hf_fw1_uuid, tvb, 8, 4, FALSE);