From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 21 12:50:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64CA31065676 for ; Mon, 21 Dec 2009 12:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 28D678FC12 for ; Mon, 21 Dec 2009 12:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nBLCo1ZY003620 for ; Mon, 21 Dec 2009 12:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nBLCo1Ov003619; Mon, 21 Dec 2009 12:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 21 Dec 2009 12:50:01 GMT Resent-Message-Id: <200912211250.nBLCo1Ov003619@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henning Petersen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ED9D106568F for ; Mon, 21 Dec 2009 12:42:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id F2A148FC1F for ; Mon, 21 Dec 2009 12:42:07 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBLCg714028628 for ; Mon, 21 Dec 2009 12:42:07 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nBLCg7kl028627; Mon, 21 Dec 2009 12:42:07 GMT (envelope-from nobody) Message-Id: <200912211242.nBLCg7kl028627@www.freebsd.org> Date: Mon, 21 Dec 2009 12:42:07 GMT From: Henning Petersen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/141838: Limits in usr.sbin/rtsold/probe.c false X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2009 12:50:01 -0000 >Number: 141838 >Category: bin >Synopsis: Limits in usr.sbin/rtsold/probe.c false >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 21 12:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Henning Petersen >Release: Freebsd-current >Organization: >Environment: >Description: Limits in usr.sbin/rtsold/probe.c false . >How-To-Repeat: >Fix: diff -u -r1.12 probe.c --- src/usr.sbin/rtsold/probe.c 7 Nov 2007 10:53:41 -0000 1.12 +++ src/usr.sbin/rtsold/probe.c 21 Dec 2009 11:58:37 -0000 @@ -118,7 +118,7 @@ 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)) { Patch attached with submission follows: Index: src/usr.sbin/rtsold/probe.c =================================================================== RCS file: /usr/ncvs/src/usr.sbin/rtsold/probe.c,v retrieving revision 1.12 diff -u -r1.12 probe.c --- src/usr.sbin/rtsold/probe.c 7 Nov 2007 10:53:41 -0000 1.12 +++ src/usr.sbin/rtsold/probe.c 21 Dec 2009 11:58:37 -0000 @@ -118,7 +118,7 @@ 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)) { >Release-Note: >Audit-Trail: >Unformatted: