Skip to content

Commit 3af4b23

Browse files
committed
lib: Fix compiler warning from wrong array size
1 parent fd5c262 commit 3af4b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/hci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ int hci_write_local_name(int dd, const char *name, int to)
16051605
struct hci_request rq;
16061606

16071607
memset(&cp, 0, sizeof(cp));
1608-
strncpy((char *) cp.name, name, sizeof(cp.name));
1608+
strncpy((char *) cp.name, name, sizeof(cp.name) - 1);
16091609

16101610
memset(&rq, 0, sizeof(rq));
16111611
rq.ogf = OGF_HOST_CTL;

0 commit comments

Comments
 (0)