svn commit: r202548 - stable/8/usr.sbin/rtsold
Xin LI
delphij at FreeBSD.org
Mon Jan 18 04:58:15 UTC 2010
Author: delphij
Date: Mon Jan 18 04:58:14 2010
New Revision: 202548
URL: http://svn.freebsd.org/changeset/base/202548
Log:
MFC r210520:
Test index value is within the range before using it to reference
array member.
PR: bin/141838
Submitted by: Henning Petersen <henning.petersen at t-online.de>
Modified:
stable/8/usr.sbin/rtsold/probe.c
Directory Properties:
stable/8/usr.sbin/rtsold/ (props changed)
Modified: stable/8/usr.sbin/rtsold/probe.c
==============================================================================
--- stable/8/usr.sbin/rtsold/probe.c Mon Jan 18 04:08:43 2010 (r202547)
+++ stable/8/usr.sbin/rtsold/probe.c Mon Jan 18 04:58:14 2010 (r202548)
@@ -118,7 +118,7 @@ defrouter_probe(struct ifinfo *ifinfo)
goto closeandend;
}
- for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) {
+ for (i = 0; i < DRLSTSIZ && 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)) {
More information about the svn-src-all
mailing list