summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-03-20 17:41:21 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-03-20 17:41:21 +0000
commit707c26405acc84126bcb1500484bbf3e12c86748 (patch)
tree196ec6a375992aa7e58899e97661487a51262873
parent048a93f6f7453071a7d22e3ef84055f63c304947 (diff)
Fix uninitialized memory access
-rw-r--r--hcid/dbus-hci.c6
1 files 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);