INIT UNINITIALIZED VARIABLE IN ROUTE CODE
authorCharles Hannum <mycroft@ai.mit.edu>
Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)
committerCharles Hannum <mycroft@ai.mit.edu>
Sat, 27 Feb 1993 00:00:00 +0000 (00:00 +0000)
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

index 2d69294..5e2ceb9 100644 (file)
  * SUCH DAMAGE.
  *
  *     @(#)route.c     7.22 (Berkeley) 6/27/91
  * 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"
 #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;
 {
        int flags;
        struct rtentry **rtp;
 {
-       register struct rtentry *rt;
+       register struct rtentry *rt = 0;
        int error = 0;
        short *stat = 0;
 
        int error = 0;
        short *stat = 0;