From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 21 11:07:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C515916A4CE for ; Sat, 21 Aug 2004 11:07:53 +0000 (GMT) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id D78DB43D1D for ; Sat, 21 Aug 2004 11:07:52 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received-SPF: pass (mp2.macomnet.net: domain of maxim@macomnet.ru designates 127.0.0.1 as permitted sender) receiver=mp2.macomnet.net; client_ip=127.0.0.1; envelope-from=maxim@macomnet.ru; Received: from localhost (i1xxom2y@localhost [127.0.0.1]) by mp2.macomnet.net (8.12.11/8.12.11) with ESMTP id i7LB7np3035132; Sat, 21 Aug 2004 15:07:49 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sat, 21 Aug 2004 15:07:49 +0400 (MSD) From: Maxim Konovalov To: Skip Ford In-Reply-To: <20040821131924.U34847@mp2.macomnet.net> Message-ID: <20040821150427.O35076@mp2.macomnet.net> References: <412652AA.5020308@coverity.com> <20040821120624.I34489@mp2.macomnet.net> <20040821090001.GB593@lucy.pool-70-17-33-167.pskn.east.verizon.net> <20040821131924.U34847@mp2.macomnet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: Ted Unangst Subject: Re: off by one bounds X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2004 11:07:53 -0000 On Sat, 21 Aug 2004, 13:19+0400, Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 05:00-0400, Skip Ford wrote: > > > Maxim Konovalov wrote: > > > On Fri, 20 Aug 2004, 12:36-0700, Ted Unangst wrote: > > > > > >> errors in freebsd 4.10 found by Coverity's analysis. > > > > > >> ip_icmp.c:ip_next_mtu, i == sizeof, dir >= 0 > > > > > > If i == sizeof then mtutab[i] == 0 > > > > If "i == sizeof" then mtutab[i] is out of bounds, off by one. > > There is no mtutab[sizeof mtutab / sizeof mtutab[0]]. > > > > This isn't specific to RELENG_4 After the second thought I still think it is not a error. mtu is always >= than the minimal value in mtutab[] that is why i is always less than (sizeof mtutab) / sizeof mtutab[0]). What do you think? -- Maxim Konovalov