Date: Thu, 28 Jul 2016 15:02:56 +0200 From: Ed Schouten <ed@nuxi.nl> To: Bruce Evans <brde@optusnet.com.au> Cc: Ed Schouten <ed@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303342 - in head: include lib/libc/stdlib Message-ID: <CABh_MK=oe_pcTc10FeyeoNPhm%2B4CKV9uKL1W8JtRKAm4eihQfg@mail.gmail.com> In-Reply-To: <20160727091654.P1485@besplex.bde.org> References: <201607262011.u6QKBTDp043256@repo.freebsd.org> <20160727091654.P1485@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bruce, 2016-07-27 2:44 GMT+02:00 Bruce Evans <brde@optusnet.com.au>: > This might work here since the type is unsigned, but it wouldn't work to > change from int to long. Yes. That's a pretty good remark. What makes this pretty safe in this case is that srandom() discard the top bits anyway. The first thing it does is cast the argument to an uint32_t, so even if we didn't properly zero/size extend this, it wouldn't end up being used. Best regards, -- Ed Schouten <ed@nuxi.nl> Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MK=oe_pcTc10FeyeoNPhm%2B4CKV9uKL1W8JtRKAm4eihQfg>