Commit 3be3f0c0 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

kernel32: Correctly restore protection in set_entry_point().

parent bf1486af
......@@ -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;
......
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