Detours: only check ASLR registry entry on NT 6.0 and NT 6.1

MoveImages no longer exists on NT 6.2 and higher; ASLR is always enabled so we should use the ASLR code regardless of this registry entry.
This commit is contained in:
Kawe Mazidjatari committed 2025-05-26 17:32:21 +02:00
1 parent e0ea354350
commit ae28a059fc
1 file changed
+3 -1
+3 -1
View File
@@ -141,7 +141,9 @@ static void detour_init_memory()
const PEB64* const peb = NtCurrentPeb();
if (peb->OSMajorVersion >= 6) {
if (detours_aslr_enabled()) {
if (peb->OSMajorVersion != 6 ||
peb->OSMinorVersion > 1 ||
detours_aslr_enabled()) {
#if defined(DETOURS_64BIT)
/* 1GB after Ntdll.dll */
PLDR_DATA_TABLE_ENTRY NtdllLdrEntry = CONTAINING_RECORD(NtCurrentPeb()->Ldr->InInitializationOrderModuleList.Flink,