From 707c26405acc84126bcb1500484bbf3e12c86748 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 20 Mar 2008 17:41:21 +0000 Subject: Fix uninitialized memory access --- hcid/dbus-hci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 40b7a886..69b4ab77 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -953,6 +953,9 @@ static void passkey_cb(struct agent *agent, DBusError *err, const char *passkey, return; } + str2ba(adapter->address, &sba); + str2ba(device->address, &dba); + if (err) { if (device->created) device_remove(connection, device); @@ -963,9 +966,6 @@ static void passkey_cb(struct agent *agent, DBusError *err, const char *passkey, device->created = FALSE; - str2ba(adapter->address, &sba); - str2ba(device->address, &dba); - len = strlen(passkey); set_pin_length(&sba, len); -- cgit