summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-07-29 11:54:14 +0200
committerCedric Bail <cedric.bail@samsung.com>2013-07-29 18:58:41 +0900
commit0ec54484f7d2fb8ea875169d82a8d4c79e3e46df (patch)
tree37fb15502f530f4c01f39b7bf8bd6aa6d5614210 /src/lib/evil
parentfa57dd8b2a36d46ae1e0cc621cd5a8164feb334f (diff)
evil: fix access value to shared memory.
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_mman.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c
index 709eb24fc8..f6d22f7378 100644
--- a/src/lib/evil/evil_mman.c
+++ b/src/lib/evil/evil_mman.c
@@ -150,19 +150,19 @@ mmap(void *addr EVIL_UNUSED,
150 return MAP_FAILED; 150 return MAP_FAILED;
151 } 151 }
152 152
153 if (protect & PAGE_READWRITE) 153 if ((protect & PAGE_READWRITE) == PAGE_READWRITE)
154 acs = FILE_MAP_ALL_ACCESS; 154 acs = FILE_MAP_ALL_ACCESS;
155 if (protect & PAGE_WRITECOPY) 155 else if ((protect & PAGE_WRITECOPY) == PAGE_WRITECOPY)
156 acs = FILE_MAP_COPY; 156 acs = FILE_MAP_COPY;
157#if 0 157#if 0
158 if (protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ)) 158 if (protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ))
159 acs = FILE_MAP_EXECUTE; 159 acs = FILE_MAP_EXECUTE;
160#endif 160#endif
161 if (protect & (PAGE_READWRITE | PAGE_READONLY)) 161 else if ((protect & (PAGE_READWRITE | PAGE_READONLY)) == (PAGE_READWRITE | PAGE_READONLY))
162 acs = FILE_MAP_READ; 162 acs = FILE_MAP_READ;
163 else 163 else
164 { 164 {
165 if (protect & PAGE_READWRITE) 165 if ((protect & PAGE_WRITECOPY) == PAGE_WRITECOPY)
166 acs = FILE_MAP_WRITE; 166 acs = FILE_MAP_WRITE;
167 } 167 }
168 168