Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rtsold check if i is in range before using it.
details: https://anonhg.NetBSD.org/src/rev/38b13c731985
branches: trunk
changeset: 750887:38b13c731985
user: christos <christos%NetBSD.org@localhost>
date: Mon Jan 18 04:53:10 2010 +0000
description:
check if i is in range before using it.
diffstat:
usr.sbin/rtsold/probe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r ba2ce6ab21c2 -r 38b13c731985 usr.sbin/rtsold/probe.c
--- a/usr.sbin/rtsold/probe.c Mon Jan 18 01:51:25 2010 +0000
+++ b/usr.sbin/rtsold/probe.c Mon Jan 18 04:53:10 2010 +0000
@@ -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)) {
Home |
Main Index |
Thread Index |
Old Index