Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2010 04:58:14 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r202548 - stable/8/usr.sbin/rtsold
Message-ID:  <201001180458.o0I4wETh054834@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001180458.o0I4wETh054834>