aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-12-17 22:38:40 +0000
committerEvan Huus <eapache@gmail.com>2013-12-17 22:38:40 +0000
commita2bb473ead4c16a8a91475303f51a4ad927112f9 (patch)
tree4447750b72dccdbec94744b7f659a116d45c7bc6
parentff2a5847b9898b99f9c513a73232b6b9f9a8212b (diff)
Fix what appears to be a misuse of pointers in the LLDP dissector as caught by
Alexis's ASAN fuzzing. Pass the address of a guid on the stack, not the address of a pointer to a guid which doesn't actually point to anything... svn path=/trunk/; revision=54203
-rw-r--r--epan/dissectors/packet-lldp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index 7685367fac..41ceb2e14e 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -2233,7 +2233,7 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gu
guint32 port_tx_delay_local;
guint32 port_tx_delay_remote;
guint32 cable_delay_local;
- e_guid_t * uuid;
+ e_guid_t uuid;
guint16 mrrt_PortStatus;
@@ -2309,8 +2309,8 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gu
case 4: /* LLDP_PNIO_MRPPORTSTATUS */
{
/* DomainUUID */
- tvb_get_ntohguid (tvb, offset, (e_guid_t *) &uuid);
- proto_tree_add_guid(tree, hf_profinet_mrp_domain_uuid, tvb, offset, 16, (e_guid_t *) &uuid);
+ tvb_get_ntohguid (tvb, offset, &uuid);
+ proto_tree_add_guid(tree, hf_profinet_mrp_domain_uuid, tvb, offset, 16, &uuid);
offset += 16;
/* MRRT PortStatus */
@@ -2331,12 +2331,12 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gu
proto_tree_add_item(tree, hf_profinet_master_source_address, tvb, offset, 6, ENC_NA);
offset += 6;
/* SubdomainUUID */
- tvb_get_ntohguid (tvb, offset, (e_guid_t *) &uuid);
- proto_tree_add_guid(tree, hf_profinet_subdomain_uuid, tvb, offset, 16, (e_guid_t *) &uuid);
+ tvb_get_ntohguid (tvb, offset, &uuid);
+ proto_tree_add_guid(tree, hf_profinet_subdomain_uuid, tvb, offset, 16, &uuid);
offset += 16;
/* IRDataUUID */
- tvb_get_ntohguid (tvb, offset, (e_guid_t *) &uuid);
- proto_tree_add_guid(tree, hf_profinet_ir_data_uuid, tvb, offset, 16, (e_guid_t *) &uuid);
+ tvb_get_ntohguid (tvb, offset, &uuid);
+ proto_tree_add_guid(tree, hf_profinet_ir_data_uuid, tvb, offset, 16, &uuid);
offset += 16;
/* LengthOfPeriod */
offset = dissect_profinet_period(tvb, tree, offset, "LengthOfPeriod",