mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 11:14:09 +00:00
kernel32: Correctly restore protection in set_entry_point().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bf1486afaa
commit
3be3f0c0f8
|
@ -65,7 +65,7 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
|
|||
TRACE( "setting %s at %p to %08x\n", name, &functions[ordinal], rva );
|
||||
VirtualProtect( functions + ordinal, sizeof(*functions), PAGE_READWRITE, &oldprot );
|
||||
functions[ordinal] = rva;
|
||||
VirtualProtect( functions + ordinal, sizeof(*functions), oldprot, NULL );
|
||||
VirtualProtect( functions + ordinal, sizeof(*functions), oldprot, &oldprot );
|
||||
return;
|
||||
}
|
||||
if (res > 0) max = pos - 1;
|
||||
|
|
Loading…
Reference in a new issue