Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(901)

Unified Diff: sandbox/src/target_process.cc

Issue 10666018: Add eight more bits of entropy to the sandbox intercept trampoline (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/src/interception.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/target_process.cc
===================================================================
--- sandbox/src/target_process.cc (revision 143815)
+++ sandbox/src/target_process.cc (working copy)
@@ -47,8 +47,8 @@
rand_s(&limit);
char* ptr = 0;
const size_t kMask64k = 0xFFFF;
- // Random range (512k-4.5mb) in 64k steps.
- const char* end = ptr + ((((limit % 4096) + 512) * 1024) & ~kMask64k);
+ // Random range (512k-16.5mb) in 64k steps.
+ const char* end = ptr + ((((limit % 16384) + 512) * 1024) & ~kMask64k);
while (ptr < end) {
MEMORY_BASIC_INFORMATION memory_info;
if (!::VirtualQueryEx(process, ptr, &memory_info, sizeof(memory_info)))
« no previous file with comments | « sandbox/src/interception.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698