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.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.c')
| -rw-r--r-- | zebra/if_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c index debc151d75..8bec256355 100644 --- a/zebra/if_ioctl.c +++ b/zebra/if_ioctl.c @@ -147,7 +147,7 @@ static int if_get_hwaddr(struct interface *ifp) struct ifreq ifreq; int i; - strncpy(ifreq.ifr_name, ifp->name, IFNAMSIZ); + strlcpy(ifreq.ifr_name, ifp->name, sizeof(ifreq.ifr_name)); ifreq.ifr_addr.sa_family = AF_INET; /* Fetch Hardware address if available. */ |
