mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 08:22:27 +01:00
fix jot -r on 64-bit platforms by teaching it that arc4random outputs
an int, not a long Submitted by: Paul Herman <pherman@frenchfries.net> PR#: alpha/31859
This commit is contained in:
parent
8ba1f55b49
commit
f776d8e82b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86196
@ -277,7 +277,7 @@ main(argc, argv)
|
||||
if (randomize) {
|
||||
*x = (ender - begin) * (ender > begin ? 1 : -1);
|
||||
for (*i = 1; *i <= reps || infinity; (*i)++) {
|
||||
*y = arc4random() / (double)ULONG_MAX;
|
||||
*y = arc4random() / (double)UINT_MAX;
|
||||
if (putdata(*y * *x + begin, reps - *i))
|
||||
errx(1, "range error in conversion");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user