summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/security.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hcid/security.c b/hcid/security.c
index 08a5835d..98c00ca8 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -205,6 +205,8 @@ static inline int get_bdaddr(int dev, bdaddr_t *sba, uint16_t handle, bdaddr_t *
if (!cl)
return -ENOMEM;
+ memset(cl, 0, 10 * sizeof(*ci) + sizeof(*cl));
+
ba2str(sba, addr);
cl->dev_id = hci_devid(addr);
cl->conn_num = 10;
@@ -348,6 +350,8 @@ static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
if (!cr)
return;
+ memset(cr, 0, sizeof(*cr) + sizeof(*ci));
+
bacpy(&cr->bdaddr, dba);
cr->type = ACL_LINK;
if (ioctl(dev, HCIGETCONNINFO, (unsigned long) cr) < 0) {