summaryrefslogtreecommitdiff
path: root/profiles/network
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-12-20 15:51:49 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-12-23 11:45:31 -0800
commit2be2b945e23ea9740aef79d1e719ce793413e129 (patch)
tree08c77aca2541c256f72b2e95f068e264de5c6615 /profiles/network
parent4839b1135d68adca9d58a0226734cac4a9793071 (diff)
downloadbluez-2be2b945e23ea9740aef79d1e719ce793413e129.tar.gz
build: Fix build when sanitizer are enabled
This fixes various issues found when sanitizers are enabled.
Diffstat (limited to 'profiles/network')
-rw-r--r--profiles/network/bnep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index f94f1da8a..54b950058 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -108,7 +108,7 @@ static int bnep_connadd(int sk, uint16_t role, char *dev)
struct bnep_connadd_req req;
memset(&req, 0, sizeof(req));
- strncpy(req.device, dev, 16);
+ strncpy(req.device, dev, 15);
req.device[15] = '\0';
req.sock = sk;
@@ -345,7 +345,7 @@ struct bnep *bnep_new(int sk, uint16_t local_role, uint16_t remote_role,
session->io = g_io_channel_unix_new(dup_fd);
session->src = local_role;
session->dst = remote_role;
- strncpy(session->iface, iface, 16);
+ strncpy(session->iface, iface, 15);
session->iface[15] = '\0';
g_io_channel_set_close_on_unref(session->io, TRUE);