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

Unified Diff: base/memory/shared_memory_unittest.cc

Issue 1791383003: Add sharing flag to file open during unsafe image test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index cfb0b329e03d1d9be15d977417ca93a7b5e3b8a8..059e0193589a9865ffa61dc6a710fafc3d12326e 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -589,8 +589,8 @@ TEST(SharedMemoryTest, UnsafeImageSection) {
EXPECT_GT(::GetModuleFileName(nullptr, path, arraysize(path)), 0U);
// Map the current executable image to save us creating a new PE file on disk.
- base::win::ScopedHandle file_handle(
- ::CreateFile(path, GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr));
+ base::win::ScopedHandle file_handle(::CreateFile(
+ path, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr));
EXPECT_TRUE(file_handle.IsValid());
base::win::ScopedHandle section_handle(
::CreateFileMappingA(file_handle.Get(), nullptr,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698