Diff between fd5c262eebaa81e29eb7fbece1847129fbbdbb06 and 3af4b2348823450c134e0565f66b6c90411c1093

Changed Files

File Additions Deletions Status
lib/hci.c +1 -1 modified

Full Patch

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 @@ 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;