Commit 1119da47 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

kernel32: Do not omit mandatory argument for VirtualProtect.

parent 152b575e
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment