[Wine-patches] ntdll: Fix NtMapViewOfSection for CONSULT.SYS (eterbug #2675).
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Вт Мар 17 17:05:22 MSK 2009
----------- следующая часть -----------
From 618b3d99ee66c5362d853ff4f62573f7b8c984e5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 17 Mar 2009 13:14:42 +0300
Subject: [PATCH] ntdll: Fix NtMapViewOfSection for CONSULT.SYS (eterbug #2675).
---
dlls/ntdll/virtual.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 6931206..8208089 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -2310,10 +2310,15 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
/* Check parameters */
- if ((offset.u.LowPart & mask) || (*addr_ptr && ((UINT_PTR)*addr_ptr & mask)))
+ if (*addr_ptr && ((UINT_PTR)*addr_ptr & mask))
return STATUS_INVALID_PARAMETER;
+ if ((offset.u.LowPart & mask) && (protect & PAGE_READWRITE))
+ {
+ protect &= ~PAGE_READWRITE;
+ protect |= PAGE_READONLY;
+ }
- switch(protect)
+ switch(protect & ~PAGE_NOCACHE)
{
case PAGE_NOACCESS:
access = SECTION_QUERY;
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches