From owner-freebsd-bugs Mon Jul 3 20:50: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6D01637BAD0 for ; Mon, 3 Jul 2000 20:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA03392; Mon, 3 Jul 2000 20:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 3 Jul 2000 20:50:03 -0700 (PDT) Message-Id: <200007040350.UAA03392@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Gilbert Subject: Re: kern/19688: Adding some KASSERTS v1 Reply-To: David Gilbert Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/19688; it has been noted by GNATS. From: David Gilbert To: Bill Fumerola Cc: David Gilbert , FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/19688: Adding some KASSERTS v1 Date: Mon, 3 Jul 2000 23:41:42 -0400 (EDT) >>>>> "Bill" == Bill Fumerola writes: Bill> On Mon, Jul 03, 2000 at 11:15:11PM -0400, David Gilbert wrote: >> >Description: >> >> I'm trying to track down other bugs, so I'm going through >> networking file-by-file looking for possibly array overflows (which >> I belive my problem to be). Anyways, I felt that it might be >> useful if I contributed some of my KASSERT()'s back to the tree. >> Someone can slap my fingers if this is misguided. >> >> >How-To-Repeat: >> >> heh. >> >> >Fix: >> >> >> --- /sys/net/hostcache.c Fri Aug 27 20:48:15 1999 +++ hostcache.c >> Mon Jul 3 23:08:34 2000 @@ -55,6 +55,8 @@ struct hchead *heads; >> u_long nelem; >> >> + KASSERT(af >= 0 && af < AF_MAX, ("hc_init: af=%d out of range", >> af)); + hct = &hctable[af]; nelem = init_nelem; if >> (hct->hct_nentries) Bill> [...] Bill> I can't tell you misguided or not, I can tell you that it's Bill> misindented though :-> Are we dealing with a tab-stop differenece here? I believe that the code looks the same when I'm looking at it in my editor. Dave. -- ============================================================================ |David Gilbert, Velocet Communications. | Two things can only be | |Mail: dgilbert@velocet.net | equal if and only if they | |http://www.velocet.net/~dgilbert | are precisely opposite. | =========================================================GLO================ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message