summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--network/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/network/common.c b/network/common.c
index c92baf0c..371d74bf 100644
--- a/network/common.c
+++ b/network/common.c
@@ -262,7 +262,7 @@ int bnep_if_up(const char *devname, uint16_t id)
sd = socket(AF_INET6, SOCK_DGRAM, 0);
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, devname);
+ strncpy(ifr.ifr_name, devname, IF_NAMESIZE);
ifr.ifr_flags |= IFF_UP;
ifr.ifr_flags |= IFF_MULTICAST;
@@ -352,7 +352,7 @@ int bnep_if_down(const char *devname)
done:
sd = socket(AF_INET6, SOCK_DGRAM, 0);
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, devname);
+ strncpy(ifr.ifr_name, devname, IF_NAMESIZE);
ifr.ifr_flags &= ~IFF_UP;