summaryrefslogtreecommitdiff
path: root/lib/hci.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:35:32 +0200
committerMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:35:32 +0200
commit3af4b2348823450c134e0565f66b6c90411c1093 (patch)
tree91d59c0c50b4d2c13be02469ff97936e645dcece /lib/hci.c
parentfd5c262eebaa81e29eb7fbece1847129fbbdbb06 (diff)
downloadbluez-3af4b2348823450c134e0565f66b6c90411c1093.tar.gz
lib: Fix compiler warning from wrong array size
Diffstat (limited to 'lib/hci.c')
-rw-r--r--lib/hci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hci.c b/lib/hci.c
index 4e69274d2..28e53f490 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -1605,7 +1605,7 @@ int hci_write_local_name(int dd, const char *name, int to)
struct hci_request rq;
memset(&cp, 0, sizeof(cp));
- strncpy((char *) cp.name, name, sizeof(cp.name));
+ strncpy((char *) cp.name, name, sizeof(cp.name) - 1);
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_HOST_CTL;