Summary: | srand() initializes seed for random() function | ||
---|---|---|---|
Product: | glibc | Reporter: | JM <jm3dev> |
Component: | libc | Assignee: | Ondrej Bilka <neleai> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | drepper.fsp, fweimer, jm3dev, roland |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.12 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | split random seeds |
Description
JM
2012-09-07 23:06:29 UTC
Created attachment 6784 [details]
split random seeds
Originally the existing behavior was correct (srand/rand are just aliases for srandom/random). Later versions of 1003.1 started specifying srandom as well as srand, so this has become nonconforming. http://pubs.opengroup.org/onlinepubs/9699919799/functions/rand.html The implementation shall behave as if no function defined in this volume of POSIX.1-2008 calls rand() or srand(). Note that srandom and random are defined in this volume: http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html Not marking as security because these random number generators should not be used for anything security-related. |