From owner-cvs-all Wed May 8 21:10: 7 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 6AD9937B40D; Wed, 8 May 2002 21:10:01 -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 g4949sWi000924; Thu, 9 May 2002 08:09:58 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.3/8.12.3/Submit) id g4949sTQ000923; Thu, 9 May 2002 08:09:54 +0400 (MSD) Date: Thu, 9 May 2002 08:09:53 +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: <20020509040953.GA894@nagual.pp.ru> References: <200205082349.g48NnK708651@freefall.freebsd.org> <20020509134229.N3451-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020509134229.N3451-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 13:50:37 +1000, Bruce Evans wrote: > On Wed, 8 May 2002, Andrey A. Chernov wrote: > > > ache 2002/05/08 16:49:20 PDT > > > > Modified files: > > sbin/sysctl sysctl.c > > Log: > > Don't forget to null-terminate string we got from sysctl (f.e. in 'A' format). > > Stack garbadge may be printed otherwise. > > > > 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). -- 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