Dmitry Timoshkov : ntdll: Move adding VPROT_READ for Solaris to the same place where it' s done for FreeBSD.

Alexandre Julliard julliard at winehq.org
Mon Oct 17 13:08:55 CDT 2011


Module: wine
Branch: master
Commit: 16eac43c8e043fc1d3b92d3fe6074b3d03acb3d0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=16eac43c8e043fc1d3b92d3fe6074b3d03acb3d0

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Oct 14 13:47:37 2011 +0900

ntdll: Move adding VPROT_READ for Solaris to the same place where it's done for FreeBSD.

---

 dlls/ntdll/virtual.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 9ba98b4..054b924 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -187,8 +187,8 @@ static int VIRTUAL_GetUnixProt( BYTE vprot )
     if ((vprot & VPROT_COMMITTED) && !(vprot & VPROT_GUARD))
     {
         if (vprot & VPROT_READ) prot |= PROT_READ;
-        if (vprot & VPROT_WRITE) prot |= PROT_WRITE;
-        if (vprot & VPROT_WRITECOPY) prot |= PROT_WRITE;
+        if (vprot & VPROT_WRITE) prot |= PROT_WRITE | PROT_READ;
+        if (vprot & VPROT_WRITECOPY) prot |= PROT_WRITE | PROT_READ;
         if (vprot & VPROT_EXEC) prot |= PROT_EXEC | PROT_READ;
         if (vprot & VPROT_WRITEWATCH) prot &= ~PROT_WRITE;
     }
@@ -1345,9 +1345,9 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
         if (sec->Characteristics & IMAGE_SCN_MEM_WRITE)
         {
             if (sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
-                vprot |= VPROT_READ | VPROT_WRITE;
+                vprot |= VPROT_WRITE;
             else
-                vprot |= VPROT_READ | VPROT_WRITECOPY;
+                vprot |= VPROT_WRITECOPY;
         }
 
         /* Dumb game crack lets the AOEP point into a data section. Adjust. */




More information about the wine-cvs mailing list