vm: make aslr use more secure PRNG

This commit is contained in:
Pawel Dziepak 2013-04-11 17:16:49 +02:00
parent d0a8e6ef2b
commit cf35dcc5bc

View File

@ -407,7 +407,7 @@ VMUserAddressSpace::_RandomizeAddress(addr_t start, addr_t end,
else
range = min_c(range, kMaxRandomize);
addr_t random = get_random<addr_t>();
addr_t random = secure_get_random<addr_t>();
random %= range;
random &= ~addr_t(alignment - 1);