Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ndp use strncpy() to set ifname arg to ioctl.
details: https://anonhg.NetBSD.org/src/rev/721bf242f83e
branches: trunk
changeset: 517194:721bf242f83e
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Nov 08 09:45:34 2001 +0000
description:
use strncpy() to set ifname arg to ioctl.
diffstat:
usr.sbin/ndp/ndp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r abb8e18619dd -r 721bf242f83e usr.sbin/ndp/ndp.c
--- a/usr.sbin/ndp/ndp.c Thu Nov 08 09:15:08 2001 +0000
+++ b/usr.sbin/ndp/ndp.c Thu Nov 08 09:45:34 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ndp.c,v 1.17 2001/10/06 19:39:23 bjh21 Exp $ */
+/* $NetBSD: ndp.c,v 1.18 2001/11/08 09:45:34 itojun Exp $ */
/* $KAME: ndp.c,v 1.69 2001/07/23 14:46:31 itojun Exp $ */
/*
@@ -914,7 +914,7 @@
/* 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 */
Home |
Main Index |
Thread Index |
Old Index