summaryrefslogtreecommitdiff
path: root/zebra/ioctl.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-05-29 23:55:17 -0300
committerGitHub <noreply@github.com>2019-05-29 23:55:17 -0300
commit0ad79902fc5f4219feef1fec2ee7b5dfd3f34f98 (patch)
tree603415acae0525e1e09f1a0a2a0c362766783ab3 /zebra/ioctl.c
parentfc37d4fe0d22aafcaac0c71cc41e426ef7b8a71d (diff)
parent67c726a10d90b9edc02e99e5a9064d14f9920309 (diff)
Merge pull request #4267 from qlyoung/fix-misc-compile-warnings
Fix misc compile warnings, remove strcpy & strcat
Diffstat (limited to 'zebra/ioctl.c')
-rw-r--r--zebra/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/ioctl.c b/zebra/ioctl.c
index 322527015b..8202e076af 100644
--- a/zebra/ioctl.c
+++ b/zebra/ioctl.c
@@ -245,7 +245,7 @@ static int if_set_prefix_ctx(const struct zebra_dplane_ctx *ctx)
p = (struct prefix_ipv4 *)dplane_ctx_get_intf_addr(ctx);
memset(&addreq, 0, sizeof(addreq));
- strncpy((char *)&addreq.ifra_name, dplane_ctx_get_ifname(ctx),
+ strlcpy((char *)&addreq.ifra_name, dplane_ctx_get_ifname(ctx),
sizeof(addreq.ifra_name));
memset(&addr, 0, sizeof(struct sockaddr_in));
@@ -296,7 +296,7 @@ static int if_unset_prefix_ctx(const struct zebra_dplane_ctx *ctx)
p = (struct prefix_ipv4 *)dplane_ctx_get_intf_addr(ctx);
memset(&addreq, 0, sizeof(addreq));
- strncpy((char *)&addreq.ifra_name, dplane_ctx_get_ifname(ctx),
+ strlcpy((char *)&addreq.ifra_name, dplane_ctx_get_ifname(ctx),
sizeof(addreq.ifra_name));
memset(&addr, 0, sizeof(struct sockaddr_in));