diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 17:37:34 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 17:52:37 +0000 |
| commit | 138a49659671bc247a98c51869c625e8fcd6d46e (patch) | |
| tree | 31a62cbc67996a7c7dd21c170c0e856be6954616 /zebra/if_ioctl_solaris.c | |
| parent | 5a80b8c7c254b9955e357555ebd929ab9bc123ef (diff) | |
zebra: remove all instances of strncpy
We have strlcpy.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/if_ioctl_solaris.c')
| -rw-r--r-- | zebra/if_ioctl_solaris.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c index 2c29930c3f..8b539a9049 100644 --- a/zebra/if_ioctl_solaris.c +++ b/zebra/if_ioctl_solaris.c @@ -247,7 +247,8 @@ static int if_get_addr(struct interface *ifp, struct sockaddr *addr, * We need to use the logical interface name / label, if we've been * given one, in order to get the right address */ - strncpy(lifreq.lifr_name, (label ? label : ifp->name), IFNAMSIZ); + strlcpy(lifreq.lifr_name, (label ? label : ifp->name), + sizeof(lifreq.lifr_name)); /* Interface's address. */ memcpy(&lifreq.lifr_addr, addr, ADDRLEN(addr)); |
