Sebastian Lackner : kernel32: Do not omit mandatory argument for VirtualProtect.

Alexandre Julliard julliard at wine.codeweavers.com
Mon May 4 07:58:53 CDT 2015


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

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Sat May  2 18:42:09 2015 +0200

kernel32: Do not omit mandatory argument for VirtualProtect.

---

 dlls/kernel32/except.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c
index bd50e88..2a7dbaa 100644
--- a/dlls/kernel32/except.c
+++ b/dlls/kernel32/except.c
@@ -401,6 +401,7 @@ static BOOL start_debugger_atomic(PEXCEPTION_POINTERS epointers)
  */
 static inline BOOL check_resource_write( void *addr )
 {
+    DWORD old_prot;
     void *rsrc;
     DWORD size;
     MEMORY_BASIC_INFORMATION info;
@@ -412,7 +413,7 @@ static inline BOOL check_resource_write( void *addr )
         return FALSE;
     if (addr < rsrc || (char *)addr >= (char *)rsrc + size) return FALSE;
     TRACE( "Broken app is writing to the resource data, enabling work-around\n" );
-    VirtualProtect( rsrc, size, PAGE_READWRITE, NULL );
+    VirtualProtect( rsrc, size, PAGE_READWRITE, &old_prot );
     return TRUE;
 }
 




More information about the wine-cvs mailing list