summaryrefslogtreecommitdiffstats
path: root/pand/bnep.c
diff options
context:
space:
mode:
Diffstat (limited to 'pand/bnep.c')
-rw-r--r--pand/bnep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pand/bnep.c b/pand/bnep.c
index 3e7283f3..0f935d39 100644
--- a/pand/bnep.c
+++ b/pand/bnep.c
@@ -184,12 +184,13 @@ static int bnep_connadd(int sk, uint16_t role, char *dev)
{
struct bnep_connadd_req req;
- strcpy(req.device, dev);
+ strncpy(req.device, dev, 16);
+ req.device[15] = '\0';
req.sock = sk;
req.role = role;
if (ioctl(ctl, bnepconnadd, &req))
return -1;
- strcpy(dev, req.device);
+ strncpy(dev, req.device, 16);
return 0;
}