diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-08 18:33:53 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-29 18:03:26 +0000 | 
| commit | fcb072cdbfa87ffff0a5c94c29217a3235bbe8f3 (patch) | |
| tree | 0d3c72feeeda933bddb93525dc09c82c53ca98ab /zebra/ioctl.c | |
| parent | eab4a5c2d06d6a9b44d6d3333b5c3f2d74e95da4 (diff) | |
lib, zebra: remove uses of strncpy
This removes the last removable uses of strncpy in FRR.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/ioctl.c')
| -rw-r--r-- | zebra/ioctl.c | 4 | 
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));  | 
