aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthci_acl.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2013-06-30 21:34:40 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2013-06-30 21:34:40 +0000
commit2808e853ed2d4aacf01adba2c9d0ccb12c5a074a (patch)
treeab43a03f4ff5d5bfa87acbc4c0df286caebe238d /epan/dissectors/packet-bthci_acl.c
parente9c8d4119bc7889e19f81fa56479dc3d12bae289 (diff)
Actually initialize the localhost ethernet address before setting
dl_src/dl_dst to it. Fixes uninitialized-read warnings from Valgrind on the capture in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8827 svn path=/trunk/; revision=50268
Diffstat (limited to 'epan/dissectors/packet-bthci_acl.c')
-rw-r--r--epan/dissectors/packet-bthci_acl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c
index 9a8195b18a..bbdfc91603 100644
--- a/epan/dissectors/packet-bthci_acl.c
+++ b/epan/dissectors/packet-bthci_acl.c
@@ -258,10 +258,15 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localhost_bdaddr_entry = (localhost_bdaddr_entry_t *)wmem_tree_lookup32_array_le(hci_data->localhost_bdaddr, key);
if (localhost_bdaddr_entry && localhost_bdaddr_entry->interface_id == hci_data->interface_id &&
- localhost_bdaddr_entry->adapter_id == hci_data->adapter_id)
+ localhost_bdaddr_entry->adapter_id == hci_data->adapter_id) {
+
localhost_ether_addr = get_ether_name(localhost_bdaddr_entry->bd_addr);
- else
+ memcpy(localhost_bdaddr, localhost_bdaddr_entry->bd_addr, 6);
+ } else {
localhost_ether_addr = "localhost";
+ /* XXX - is this the right value to use? */
+ memset(localhost_bdaddr, 0, 6);
+ }
localhost_name_entry = (localhost_name_entry_t *)wmem_tree_lookup32_array_le(hci_data->localhost_name, key);
if (localhost_name_entry && localhost_name_entry->interface_id == hci_data->interface_id &&