From owner-freebsd-bugs Mon Jul 3 20:30: 6 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 77FE537B5E7 for ; Mon, 3 Jul 2000 20:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA99879; Mon, 3 Jul 2000 20:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 3 Jul 2000 20:30:03 -0700 (PDT) Message-Id: <200007040330.UAA99879@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bill Fumerola Subject: Re: kern/19688: Adding some KASSERTS v1 Reply-To: Bill Fumerola 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: Bill Fumerola To: David Gilbert Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/19688: Adding some KASSERTS v1 Date: Mon, 3 Jul 2000 23:26:20 -0400 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) [...] I can't tell you misguided or not, I can tell you that it's misindented though :-> -- Bill Fumerola - Network Architect / Computer Horizons Corp - CHIMES e-mail: billf@chimesnet.com / billf@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message