From owner-cvs-all Thu May 9 1:23:18 2002 Delivered-To: cvs-all@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 3C91637B419; Thu, 9 May 2002 01:23:13 -0700 (PDT) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.3/8.12.3) with ESMTP id g498N5Wi002202; Thu, 9 May 2002 12:23:07 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.3/8.12.3/Submit) id g498N46F002201; Thu, 9 May 2002 12:23:04 +0400 (MSD) Date: Thu, 9 May 2002 12:23:03 +0400 From: "Andrey A. Chernov" To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/sysctl sysctl.c Message-ID: <20020509082303.GA2131@nagual.pp.ru> References: <20020509040953.GA894@nagual.pp.ru> <20020509151407.D3794-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020509151407.D3794-100000@gamplex.bde.org> User-Agent: Mutt/1.3.28i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, May 09, 2002 at 15:25:11 +1000, Bruce Evans wrote: > > > > Revision Changes Path > > > > 1.45 +1 -1 src/sbin/sysctl/sysctl.c > > > > > > This overruns the buffer in the (unlikely) even that sysctl(3) returned a > > > full buffer. > > > > Do you saw j += j there? Buffer is doubled (unless I misunderstand this > > thing). > > Yes; that is why I wrote that the even[t] is unlikely. We double the buffer > size in case the name expands underneath us. If the name actually expands > by a full factor of 2, we overrun the buffer. In any case this problem not with my commit :-) -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message