kernel32: Do not omit mandatory argument for VirtualProtect.

This commit is contained in:
Sebastian Lackner 2015-05-02 18:42:09 +02:00 committed by Alexandre Julliard
parent 152b575eed
commit 1119da47ee
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}