kernel32: Use PAGE_READWRITE access when enabling write access to resource data.

This commit is contained in:
Dmitry Timoshkov 2011-10-31 13:48:08 +08:00 committed by Alexandre Julliard
parent 8a2e38cc45
commit 3daa153b29

View file

@ -412,7 +412,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_WRITECOPY, NULL );
VirtualProtect( rsrc, size, PAGE_READWRITE, NULL );
return TRUE;
}