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

Unified Diff: sandbox/win/src/process_mitigations.cc

Issue 1342303003: Replace calls to rand_s with calls to RtlGenRandom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 5 years, 3 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/win/src/interception_unittest.cc ('k') | sandbox/win/src/sandbox_rand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/process_mitigations.cc
diff --git a/sandbox/win/src/process_mitigations.cc b/sandbox/win/src/process_mitigations.cc
index f1bc090c0affe9b09d0c2dc8d186111e75b7ad74..8072440e83094372020ec68afb363d742c8aac50 100644
--- a/sandbox/win/src/process_mitigations.cc
+++ b/sandbox/win/src/process_mitigations.cc
@@ -9,6 +9,7 @@
#include "base/win/windows_version.h"
#include "sandbox/win/src/nt_internals.h"
#include "sandbox/win/src/restricted_token_utils.h"
+#include "sandbox/win/src/sandbox_rand.h"
#include "sandbox/win/src/win_utils.h"
namespace {
@@ -285,7 +286,7 @@ bool ApplyProcessMitigationsToSuspendedProcess(HANDLE process,
#if !defined(_WIN64)
if (flags & MITIGATION_BOTTOM_UP_ASLR) {
unsigned int limit;
- rand_s(&limit);
+ GetRandom(&limit);
char* ptr = 0;
const size_t kMask64k = 0xFFFF;
// Random range (512k-16.5mb) in 64k steps.
« no previous file with comments | « sandbox/win/src/interception_unittest.cc ('k') | sandbox/win/src/sandbox_rand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698