summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-09-30 23:44:18 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-09-30 23:44:18 +0000
commite3e4cf893d0e57fbcc2c28e711cef0e97ccd3059 (patch)
tree9c36f18ab9f74145b698b3deb804ebeec7a8111e
parent1712168a6ac665f19edb6d85b784cf03df89d00b (diff)
Don't use uninitialized variable.
From Peter Philipp <peter underscore philipp at freenet dot de>. OK deraadt@.
-rw-r--r--sbin/ifconfig/ifconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 8ef266fdb72..758c3c89992 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.174 2006/08/29 17:22:00 henning Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.175 2006/09/30 23:44:17 ray Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -1387,7 +1387,7 @@ setifnwkey(const char *val, int d)
return;
}
} else {
- len = sizeof(keybuf[i]);
+ len = sizeof(keybuf[0]);
val = get_string(val, NULL, keybuf[0], &len);
if (val == NULL)
return;