lib: Fix compiler warning from wrong array size
diff --git a/lib/hci.c b/lib/hci.c
index 4e69274..28e53f4 100644
--- a/lib/hci.c
+++ b/lib/hci.c
@@ -1605,7 +1605,7 @@
 	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;