kernel32: Do not omit mandatory argument for VirtualProtect.
This commit is contained in:
parent
152b575eed
commit
1119da47ee
|
@ -401,6 +401,7 @@ static BOOL start_debugger_atomic(PEXCEPTION_POINTERS epointers)
|
||||||
*/
|
*/
|
||||||
static inline BOOL check_resource_write( void *addr )
|
static inline BOOL check_resource_write( void *addr )
|
||||||
{
|
{
|
||||||
|
DWORD old_prot;
|
||||||
void *rsrc;
|
void *rsrc;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
MEMORY_BASIC_INFORMATION info;
|
MEMORY_BASIC_INFORMATION info;
|
||||||
|
@ -412,7 +413,7 @@ static inline BOOL check_resource_write( void *addr )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (addr < rsrc || (char *)addr >= (char *)rsrc + size) 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" );
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue