[2/2] ntdll: Allow reading from a VPROT_WRITECOPY protected memory
André Hentschel
nerv at dawncrow.de
Sat Sep 3 11:39:43 CDT 2011
As per tests in kernel32:loader it seems linux&co allows reads on PROT_WRITE areas, but solaris doesn't and crashes.
This fixes this issue.
---
dlls/ntdll/virtual.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index b7594ea..bc8175d 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -188,7 +188,7 @@ static int VIRTUAL_GetUnixProt( BYTE vprot )
{
if (vprot & VPROT_READ) prot |= PROT_READ;
if (vprot & VPROT_WRITE) prot |= PROT_WRITE;
- if (vprot & VPROT_WRITECOPY) prot |= PROT_WRITE;
+ if (vprot & VPROT_WRITECOPY) prot |= PROT_READ | PROT_WRITE;
if (vprot & VPROT_EXEC) prot |= PROT_EXEC;
if (vprot & VPROT_WRITEWATCH) prot &= ~PROT_WRITE;
}
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list