diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-11-08 09:52:03 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-11-08 09:52:03 +0000 |
commit | b9870b0b31e0c7957c8f97599f0e1fde3b2744f5 (patch) | |
tree | 8a911820a5ea3935f8e0d85f3ee44f0fa331e3ef /usr.sbin/ndp/ndp.c | |
parent | 0fcdf505f470964e6d8868e55f0254f8d87fd91b (diff) |
use strncpy() to set ifname arg to ioctl
Diffstat (limited to 'usr.sbin/ndp/ndp.c')
-rw-r--r-- | usr.sbin/ndp/ndp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 93a4ebf85de..4491b05ee88 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.11 2001/07/23 18:42:32 itojun Exp $ */ +/* $OpenBSD: ndp.c,v 1.12 2001/11/08 09:52:02 itojun Exp $ */ /* $KAME: ndp.c,v 1.69 2001/07/23 14:46:31 itojun Exp $ */ /* @@ -915,7 +915,7 @@ ifinfo(argc, argv) /* NOTREACHED */ } bzero(&nd, sizeof(nd)); - strcpy(nd.ifname, ifname); + strncpy(nd.ifname, ifname, sizeof(nd.ifname)); if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) < 0) { err(1, "ioctl(SIOCGIFINFO_IN6)"); /* NOTREACHED */ |