Thomas Faber : msvcrt: Do not omit mandatory argument to VirtualProtect.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 23 12:57:40 CDT 2014
Module: wine
Branch: master
Commit: 1ab9c79dcae558da0f3c5c65bbef1b2f7cfacd5f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ab9c79dcae558da0f3c5c65bbef1b2f7cfacd5f
Author: Thomas Faber <thomas.faber at reactos.org>
Date: Sun Jun 22 15:15:10 2014 +0200
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);
}
/*********************************************************************
More information about the wine-cvs
mailing list