1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Fix arc4random_buf implementation.

This commit is contained in:
Calvin Rose 2020-08-03 21:49:49 -05:00
parent 76cfbde933
commit 70ad98cc6f

View File

@ -677,9 +677,9 @@ int janet_cryptorand(uint8_t *out, size_t n) {
RETRY_EINTR(rc, close(randfd));
return 0;
#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
arc4random_buf(out, sz);
arc4random_buf(out, n);
return 0;
#else
return -1;
#endif
}
}