msvcrt: Do not omit mandatory argument to VirtualProtect.

Thomas Faber thomas.faber at reactos.org
Sun Jun 22 08:18:22 CDT 2014


From b6b3dd162ea1800376335ae94d4ed1b596880716 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thomas.faber at reactos.org>
Date: Sun, 22 Jun 2014 15:15:10 +0200
Subject: msvcrt: Do not omit mandatory argument to VirtualProtect.

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

diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c
index c07005a..4e67cba 100644
--- a/dlls/msvcrt/misc.c
+++ b/dlls/msvcrt/misc.c
@@ -394,9 +394,10 @@ unsigned int CDECL _set_output_format(unsigned int new_output_format)
 int CDECL MSVCRT__resetstkoflw(void)
 {
     int stack_addr;
+    DWORD oldprot;
 
     /* causes stack fault that updates NtCurrentTeb()->Tib.StackLimit */
-    return VirtualProtect( &stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, NULL );
+    return VirtualProtect(&stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, &oldprot);
 }
 
 /*********************************************************************
-- 
1.9.0.msysgit.0



More information about the wine-patches mailing list