diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-03-05 20:29:49 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-03-05 20:29:49 +0100 |
commit | b19abe1131daa38d1d0e31c4793925bb89f11c07 (patch) | |
tree | b4754dd35436aa6e490231cac89f43357d5d27a7 | |
parent | Merge pull request #3848 from chiragshah6/evpn_dev2 (diff) | |
download | frr-b19abe1131daa38d1d0e31c4793925bb89f11c07.tar.xz frr-b19abe1131daa38d1d0e31c4793925bb89f11c07.zip |
Revert "nhrpd: strncpy -> strlcpy"
This reverts commit eb266ecb847b70bcf9901da5ed59a39d3e07fd8f.
-rw-r--r-- | nhrpd/linux.c | 2 | ||||
-rw-r--r-- | nhrpd/vici.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c index bb5ce0fec..85e941e7b 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 fab99588c..3de4609a2 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)); |