Module Name:    src
Committed By:   christos
Date:           Mon Jan 18 04:53:10 UTC 2010

Modified Files:
        src/usr.sbin/rtsold: probe.c

Log Message:
check if i is in range before using it.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/rtsold/probe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/rtsold/probe.c
diff -u src/usr.sbin/rtsold/probe.c:1.10 src/usr.sbin/rtsold/probe.c:1.11
--- src/usr.sbin/rtsold/probe.c:1.10	Thu May 11 04:37:24 2006
+++ src/usr.sbin/rtsold/probe.c	Sun Jan 17 23:53:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: probe.c,v 1.10 2006/05/11 08:37:24 mrg Exp $	*/
+/*	$NetBSD: probe.c,v 1.11 2010/01/18 04:53:10 christos Exp $	*/
 /*	$KAME: probe.c,v 1.15 2002/05/31 21:22:08 itojun Exp $	*/
 
 /*
@@ -116,7 +116,7 @@
 		goto closeandend;
 	}
 
-	for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) {
+	for (i = 0; i < PRLSTSIZ && dr.defrouter[i].if_index; i++) {
 		if (ifindex && dr.defrouter[i].if_index == ifindex) {
 			/* sanity check */
 			if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) {

Reply via email to