mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 13:35:18 +00:00
Correctly store last random word
pseudo_random_bytes() was accidentally copying the last partial long to the beggining of the buffer instead of the end. The final partial long bytes weren't being filled. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -25,6 +25,6 @@ void pseudo_random_bytes(void *data, unsigned int len)
|
||||
|
||||
if (len) {
|
||||
__builtin_ia32_rdrand64_step(&tmp);
|
||||
memcpy(data, &tmp, len);
|
||||
memcpy(ll, &tmp, len);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user