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:
Zach Brown
2016-03-23 15:16:58 -07:00
parent d0429e1c88
commit 463f5e5a07

View File

@@ -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);
}
}