summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2016-05-29 11:54:09 +0000
committerache <ache@FreeBSD.org>2016-05-29 11:54:09 +0000
commitbfed8b7764fee498dee2fe49f3920e22955c0300 (patch)
tree07c9854f8e25528d7a181524cc03c6f83a0e7d7a /lib/libc/stdlib/rand.c
parentc2282cdf4ee0c39f911689e2e07bf659ff576c7c (diff)
downloadFreeBSD-src-bfed8b7764fee498dee2fe49f3920e22955c0300.zip
FreeBSD-src-bfed8b7764fee498dee2fe49f3920e22955c0300.tar.gz
1) Unifdef USE_WEAK_SEEDING it is too obsolete to support and makes reading
harder. 2) ACM paper require seed to be in [1, 2^31-2] range, so use the same range shifting as already done for rand(3). Also protect srandomdev() + TYPE_0 case (non default) from negative seeds. 3) Don't check for valid "type" range in setstate(), it is always valid as calculated. Instead add a check that rear pointer not exceeed end pointer. MFC after: 1 week
Diffstat (limited to 'lib/libc/stdlib/rand.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud