summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-06-06 20:30:22 +0000
committerclaudio <claudio@openbsd.org>2009-06-06 20:30:22 +0000
commit7a688004cc9e2fbf23f5262921f8812c6e7a532e (patch)
treed4abae1d481bc7ea240790d238ef0a29b05a13ab
parent- don't mess with assert()/__assert(), use KASSERT() instead (diff)
downloadwireguard-openbsd-7a688004cc9e2fbf23f5262921f8812c6e7a532e.tar.xz
wireguard-openbsd-7a688004cc9e2fbf23f5262921f8812c6e7a532e.zip
Uninitialized variable causing havoc on flush. Found by rivo nurges
-rw-r--r--sbin/route/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index e903a917084..c65ad4bc984 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.132 2009/05/31 18:02:28 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.133 2009/06/06 20:30:22 claudio Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -220,7 +220,7 @@ flushroutes(int argc, char **argv)
struct rt_msghdr *rtm;
struct sockaddr *sa;
u_char prio = 0;
- unsigned int ifindex;
+ unsigned int ifindex = 0;
if (uid)
errx(1, "must be root to alter routing table");