summaryrefslogtreecommitdiffstats
path: root/hcid/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-07-04 15:44:13 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-07-04 15:44:13 +0000
commitbfcc6ade94b279fd03a5efcbf24fe1e151584073 (patch)
tree065d9d71eb4a5c7d2ef7c502eec2b921efbdca35 /hcid/main.c
parent50111729540851e01dd1471d4ce742ee44f437e7 (diff)
Add size parameter to expand_name()
Diffstat (limited to 'hcid/main.c')
-rw-r--r--hcid/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hcid/main.c b/hcid/main.c
index be523a19..5763798c 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -227,7 +227,8 @@ static void configure_device(int hdev)
/* Set device name */
if (device_opts->name) {
change_local_name_cp cp;
- expand_name(cp.name, device_opts->name, hdev);
+ memset(cp.name, 0, sizeof(cp.name));
+ expand_name(cp.name, sizeof(cp.name), device_opts->name, hdev);
hci_send_cmd(s, OGF_HOST_CTL, OCF_CHANGE_LOCAL_NAME,
CHANGE_LOCAL_NAME_CP_SIZE, (void *) &cp);