Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/route6d setindex2ifc(): after a realloc(), zero the...



details:   https://anonhg.NetBSD.org/src/rev/06629b6356f4
branches:  trunk
changeset: 503493:06629b6356f4
user:      pk <pk%NetBSD.org@localhost>
date:      Wed Feb 07 13:24:42 2001 +0000

description:
setindex2ifc(): after a realloc(), zero the newly acquired entries.

diffstat:

 usr.sbin/route6d/route6d.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r fd8ac4df1b4d -r 06629b6356f4 usr.sbin/route6d/route6d.c
--- a/usr.sbin/route6d/route6d.c        Wed Feb 07 13:15:54 2001 +0000
+++ b/usr.sbin/route6d/route6d.c        Wed Feb 07 13:24:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route6d.c,v 1.22 2001/01/12 17:48:37 itojun Exp $      */
+/*     $NetBSD: route6d.c,v 1.23 2001/02/07 13:24:42 pk Exp $  */
 /*     $KAME: route6d.c,v 1.41 2001/01/12 17:48:02 itojun Exp $        */
 
 /*
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef        lint
-__RCSID("$NetBSD: route6d.c,v 1.22 2001/01/12 17:48:37 itojun Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.23 2001/02/07 13:24:42 pk Exp $");
 #endif
 
 #include <stdio.h>
@@ -3302,6 +3302,7 @@
                        fatal("realloc");
                        /*NOTREACHED*/
                }
+               memset(p + n, 0, sizeof(*index2ifc) * (nindex2ifc - n));
                index2ifc = p;
        }
        index2ifc[index] = ifcp;



Home | Main Index | Thread Index | Old Index