Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch by: michaelortmann srandom is currently seeded like this: srandom((unsigned int) (now % (getpid() + getppid()))); the part: % (getpid() + getppid())" truncates the range to maxpid+maxppid, which is 128k the patch enhances the seed in 3 ways 1st: the truncation is fixed by replacing the "mod (pid + ppid)" by "xor pid" 2nd: "now" is in seconds and is replaced with tv_sec * tv_usec (milliseconds) 3rd: if the modern getrandom() libc function is available, it is used instead think of getrandom() as /dev/urandom, but without any file descriptor its available under freebsd12+, linux glibc 2.25+, solaris 11.3+ this patch enhances (only) the seed for srandom and doesnt change any other random functions
- Loading branch information
1 parent
fabd9ca
commit 545fe62
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
545fe62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls runautotools