summaryrefslogtreecommitdiffstats
path: root/pand/bnep.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-15 08:21:57 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-15 08:21:57 +0000
commit2924bca7d31d8e1b2ca239316b603082e0a4cb33 (patch)
treec28f0f8cc9728e852adb01f302d38815e2c0f4e7 /pand/bnep.c
parent65d1a12cfff5d53e535134dbf03eedcc02ffb589 (diff)
Fix problems with the size limitation of netdev string
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;
}