summaryrefslogtreecommitdiffstats
path: root/zebra/ioctl.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-08-25 02:43:29 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-08-25 02:49:39 +0200
commit0af35d90a125952d04aa892522b6be324f2dfbf7 (patch)
tree30a64161c4e98d6695d8c3104d4dba1c41d8e767 /zebra/ioctl.c
parentpimd: Cleanup a variety of SA issues (diff)
downloadfrr-0af35d90a125952d04aa892522b6be324f2dfbf7.tar.xz
frr-0af35d90a125952d04aa892522b6be324f2dfbf7.zip
*: fix assorted issues detected by Coverity Scan
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/ioctl.c')
-rw-r--r--zebra/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/ioctl.c b/zebra/ioctl.c
index 835f1f493..4404bb448 100644
--- a/zebra/ioctl.c
+++ b/zebra/ioctl.c
@@ -44,7 +44,7 @@ extern struct zebra_privs_t zserv_privs;
/* clear and set interface name string */
void ifreq_set_name(struct ifreq *ifreq, struct interface *ifp)
{
- strncpy(ifreq->ifr_name, ifp->name, IFNAMSIZ);
+ strlcpy(ifreq->ifr_name, ifp->name, sizeof(ifreq->ifr_name));
}
/* call ioctl system call */