From owner-cvs-all@FreeBSD.ORG Thu Jun 23 00:31:48 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D318116A41C; Thu, 23 Jun 2005 00:31:48 +0000 (GMT) (envelope-from flata@magnesium.net) Received: from toxic.magnesium.net (toxic.magnesium.net [207.154.84.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D2C943D49; Thu, 23 Jun 2005 00:31:48 +0000 (GMT) (envelope-from flata@magnesium.net) Received: by toxic.magnesium.net (Postfix, from userid 1212) id 75AA7DA8A7; Wed, 22 Jun 2005 17:31:48 -0700 (PDT) Date: Wed, 22 Jun 2005 14:31:48 -1000 From: juli mallett To: Greg 'groggy' Lehey Message-ID: <20050623003148.GA55179@toxic.magnesium.net> References: <200506221524.j5MFO1V1045648@repoman.freebsd.org> <20050623002734.GE37620@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050623002734.GE37620@wantadilla.lemis.com> User-Agent: Mutt/1.4.1i X-Towel: Yes Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, John Baldwin Subject: Re: cvs commit: src/games/random random.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 00:31:49 -0000 * Greg 'groggy' Lehey [ Date: 2005-06-22 ] [ w.r.t. Re: cvs commit: src/games/random random.c ] > On Wednesday, 22 June 2005 at 15:24:00 +0000, John Baldwin wrote: > > jhb 2005-06-22 15:24:00 UTC > > > > FreeBSD src repository > > > > Modified files: > > games/random random.c > > Log: > > Correct an error in the previous revision. RAND_MAX is the maximum value > > for rand(3), not random(3). random(3) is defined to return values between > > 0 and 2^31-1, so add a local RANDOM_MAX constant to this file that is > > defined as 2^31-1 and use that in place of RAND_MAX. > > How much effect did this bug have on the results of random(3)? How would a bug in random(6) bounds checking affect the results of random(3)? -- juli mallett. "It's called love and somehow it's become unmentionable." -- New Order - Thieves Like Us