From a0f416fcd0cf14e412b78f00f6c191dc23b3e2c7 Mon Sep 17 00:00:00 2001 From: Charles Hannum Date: Sat, 27 Feb 1993 00:00:00 +0000 Subject: [PATCH] INIT UNINITIALIZED VARIABLE IN ROUTE CODE Obvious problem, someone forgot to initialize a variable who's value might then be bogus if a later jump was taken. Looks like this one could have caused real problems if a gateway were not directly reachable. AUTHOR: Charles Hannum 386BSD-Patchkit: patch00095 --- usr/src/sys.386bsd/net/route.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/usr/src/sys.386bsd/net/route.c b/usr/src/sys.386bsd/net/route.c index 2d69294c55..5e2ceb910f 100644 --- a/usr/src/sys.386bsd/net/route.c +++ b/usr/src/sys.386bsd/net/route.c @@ -31,7 +31,16 @@ * SUCH DAMAGE. * * @(#)route.c 7.22 (Berkeley) 6/27/91 + * + * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE + * -------------------- ----- ---------------------- + * CURRENT PATCH LEVEL: 1 00095 + * -------------------- ----- ---------------------- + * + * 27 Feb 93 Charles Hannum & ??? Proper initialization of *rt + * */ + #include "param.h" #include "systm.h" #include "proc.h" @@ -150,7 +159,7 @@ rtredirect(dst, gateway, netmask, flags, src, rtp) int flags; struct rtentry **rtp; { - register struct rtentry *rt; + register struct rtentry *rt = 0; int error = 0; short *stat = 0; -- 2.20.1