ntdll: Check the NX compatibility flag for every loaded module.
This commit is contained in:
parent
662897e9d6
commit
7ae1b2897e
|
@ -681,6 +681,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename )
|
|||
/* wait until init is called for inserting into this list */
|
||||
wm->ldr.InInitializationOrderModuleList.Flink = NULL;
|
||||
wm->ldr.InInitializationOrderModuleList.Blink = NULL;
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
WARN( "disabling no-exec because of %s\n", debugstr_w(wm->ldr.BaseDllName.Buffer) );
|
||||
VIRTUAL_SetForceExec( TRUE );
|
||||
}
|
||||
return wm;
|
||||
}
|
||||
|
||||
|
@ -2126,8 +2132,6 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3,
|
|||
|
||||
peb->ProcessParameters->ImagePathName = wm->ldr.FullDllName;
|
||||
version_init( wm->ldr.FullDllName.Buffer );
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
VIRTUAL_SetForceExec( TRUE );
|
||||
|
||||
/* the main exe needs to be the first in the load order list */
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
|
||||
|
|
Loading…
Reference in New Issue