From owner-cvs-all Thu May 9 4:26:45 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id B1DF537B42A for ; Thu, 9 May 2002 04:26:13 -0700 (PDT) Received: (qmail 9605 invoked from network); 9 May 2002 11:26:11 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 9 May 2002 11:26:11 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g49BQAF37482; Thu, 9 May 2002 07:26:10 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020509082303.GA2131@nagual.pp.ru> Date: Thu, 09 May 2002 07:26:08 -0400 (EDT) From: John Baldwin To: "Andrey A. Chernov" Subject: Re: cvs commit: src/sbin/sysctl sysctl.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Bruce Evans 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 09-May-2002 Andrey A. Chernov wrote: > 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 :-) It's still a bug that should be fixed, which is Bruce's point I think. Not all of Bruce's e-mails point out bugs in your code. Often times he is pointing out other bugs in the code hoping you will fix them since you have demonstrated some level of interest in the code. Fixing bugs is good. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message