summaryrefslogtreecommitdiff
path: root/usr.sbin/rtsold
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-11-14 01:59:37 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-11-14 01:59:37 +0000
commitd379fcce366aaa8bdf52f799add20eca8bfddb06 (patch)
treee89b456b5ab986bbbf5bf55ab74d62ff3bf37073 /usr.sbin/rtsold
parentb965d9bb4b3eef3507ac2c11db9bfc5fd44a769d (diff)
use strncpy instead of strcpy, just in case
Diffstat (limited to 'usr.sbin/rtsold')
-rw-r--r--usr.sbin/rtsold/if.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c
index adb5c9800c0..106c2247b57 100644
--- a/usr.sbin/rtsold/if.c
+++ b/usr.sbin/rtsold/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.7 2001/07/09 22:37:33 itojun Exp $ */
+/* $OpenBSD: if.c,v 1.8 2001/11/14 01:59:36 itojun Exp $ */
/* $KAME: if.c,v 1.15 2001/05/22 06:04:17 jinmei Exp $ */
/*
@@ -353,7 +353,7 @@ get_llflag(const char *name)
continue;
memset(&ifr6, 0, sizeof(ifr6));
- strcpy(ifr6.ifr_name, name);
+ strncpy(ifr6.ifr_name, name, sizeof(ifr6.ifr_name));
memcpy(&ifr6.ifr_ifru.ifru_addr, sin6, sin6->sin6_len);
if (ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) < 0) {
warnmsg(LOG_ERR, __FUNCTION__,
@@ -415,7 +415,7 @@ get_llflag(const char *name)
continue;
memset(&ifr6, 0, sizeof(ifr6));
- strcpy(ifr6.ifr_name, name);
+ strncpy(ifr6.ifr_name, name, sizeof(ifr6.ifr_name));
memcpy(&ifr6.ifr_ifru.ifru_addr, sin6, sin6->sin6_len);
if (ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) < 0) {
warnmsg(LOG_ERR, __FUNCTION__,