winedevice: Fix up protections before writing to the NT header.
This commit is contained in:
parent
903488b354
commit
fe1360252f
|
@ -100,7 +100,10 @@ static HMODULE load_driver_module( const WCHAR *name )
|
|||
if (!rel) goto error;
|
||||
}
|
||||
/* make sure we don't try again */
|
||||
size = FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + nt->FileHeader.SizeOfOptionalHeader;
|
||||
VirtualProtect( nt, size, PAGE_READWRITE, &old );
|
||||
nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0;
|
||||
VirtualProtect( nt, size, old, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue