cedric pushed a commit to branch master.

commit 0ec54484f7d2fb8ea875169d82a8d4c79e3e46df
Author: Cedric Bail <[email protected]>
Date:   Mon Jul 29 11:54:14 2013 +0200

    evil: fix access value to shared memory.
---
 src/lib/evil/evil_mman.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c
index 709eb24..f6d22f7 100644
--- a/src/lib/evil/evil_mman.c
+++ b/src/lib/evil/evil_mman.c
@@ -150,19 +150,19 @@ mmap(void  *addr EVIL_UNUSED,
              return MAP_FAILED;
           }
 
-        if (protect & PAGE_READWRITE)
+        if ((protect & PAGE_READWRITE) == PAGE_READWRITE)
           acs = FILE_MAP_ALL_ACCESS;
-        if (protect & PAGE_WRITECOPY)
+        else if ((protect & PAGE_WRITECOPY) == PAGE_WRITECOPY)
           acs = FILE_MAP_COPY;
 #if 0
         if (protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ))
           acs = FILE_MAP_EXECUTE;
 #endif
-        if (protect & (PAGE_READWRITE | PAGE_READONLY))
+        else if ((protect & (PAGE_READWRITE | PAGE_READONLY)) == 
(PAGE_READWRITE | PAGE_READONLY))
           acs = FILE_MAP_READ;
         else
           {
-             if (protect & PAGE_READWRITE)
+            if ((protect & PAGE_WRITECOPY) == PAGE_WRITECOPY)
                acs = FILE_MAP_WRITE;
           }
 

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to