]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
BSD: strlcpy > strncpy
authorRoy Marples <roy@marples.name>
Sat, 9 Nov 2019 22:22:59 +0000 (22:22 +0000)
committerRoy Marples <roy@marples.name>
Sat, 9 Nov 2019 22:22:59 +0000 (22:22 +0000)
src/if-bsd.c

index eb7673a23516134d711ae25e40cb7ac4925327b8..335e1fe5352d948ee3c364cea163542ccdaeb870 100644 (file)
@@ -1490,7 +1490,7 @@ if_applyra(const struct ra *rap)
        struct in6_ndireq ndi = { .ndi.chlim = 0 };
        struct priv *priv = rap->iface->ctx->priv;
 
-       strncpy(ndi.ifname, rap->iface->name, sizeof(ndi.ifname));
+       strlcpy(ndi.ifname, rap->iface->name, sizeof(ndi.ifname));
        if (ioctl(priv->pf_inet6_fd, SIOCGIFINFO_IN6, &ndi) == -1)
                return -1;