summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nhrpd/linux.c2
-rw-r--r--nhrpd/vici.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c
index bb5ce0fec6..85e941e7ba 100644
--- a/nhrpd/linux.c
+++ b/nhrpd/linux.c
@@ -110,7 +110,7 @@ static int linux_configure_arp(const char *iface, int on)
{
struct ifreq ifr;
- strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
+ strncpy(ifr.ifr_name, iface, IFNAMSIZ - 1);
if (ioctl(nhrp_socket_fd, SIOCGIFFLAGS, &ifr))
return -1;
diff --git a/nhrpd/vici.c b/nhrpd/vici.c
index fab99588c8..3de4609a2b 100644
--- a/nhrpd/vici.c
+++ b/nhrpd/vici.c
@@ -550,7 +550,7 @@ int sock_open_unix(const char *path)
memset(&addr, 0, sizeof(struct sockaddr_un));
addr.sun_family = AF_UNIX;
- strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
+ strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
ret = connect(fd, (struct sockaddr *)&addr,
sizeof(addr.sun_family) + strlen(addr.sun_path));