summaryrefslogtreecommitdiffstats
path: root/nhrpd/linux.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 21:26:54 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 21:50:17 +0100
commiteb266ecb847b70bcf9901da5ed59a39d3e07fd8f (patch)
tree07a355a6ab20a762db0264f87caa5c5082232a5b /nhrpd/linux.c
parentlib: strncpy -> strlcpy | memcpy (diff)
downloadfrr-eb266ecb847b70bcf9901da5ed59a39d3e07fd8f.tar.xz
frr-eb266ecb847b70bcf9901da5ed59a39d3e07fd8f.zip
nhrpd: strncpy -> strlcpy
strncpy is a byte copy function not a string copy function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'nhrpd/linux.c')
-rw-r--r--nhrpd/linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nhrpd/linux.c b/nhrpd/linux.c
index 85e941e7b..bb5ce0fec 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;
- strncpy(ifr.ifr_name, iface, IFNAMSIZ - 1);
+ strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
if (ioctl(nhrp_socket_fd, SIOCGIFFLAGS, &ifr))
return -1;