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

Unified Diff: chrome/worker/worker_main.cc

Issue 2799047: Call rand_s() in a worker process before entering the sandbox. (Closed)
Patch Set: Add test. Created 10 years, 5 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 | « no previous file | chrome/worker/worker_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/worker/worker_main.cc
diff --git a/chrome/worker/worker_main.cc b/chrome/worker/worker_main.cc
index d8397604c1148e0df8066d6d88f4d914a5d73310..82d0ecab2e07023917abf49a61a40311cdba7a3e 100644
--- a/chrome/worker/worker_main.cc
+++ b/chrome/worker/worker_main.cc
@@ -36,6 +36,10 @@ int WorkerMain(const MainFunctionParams& parameters) {
if (!target_services)
return false;
+ // Cause advapi32 to load before the sandbox is turned on.
+ unsigned int dummy_rand;
+ rand_s(&dummy_rand);
+
target_services->LowerToken();
#endif
« no previous file with comments | « no previous file | chrome/worker/worker_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698