Bug 1137609: Test for the missing export because we can't trust the version. r=glandium

This commit is contained in:
David Major 2015-03-03 19:33:31 +13:00
parent 4cb7e10356
commit d117ab2f72

View File

@ -128,11 +128,15 @@ Init()
MOZ_ASSERT(!GetModuleHandleA("msvcr120d.dll")); MOZ_ASSERT(!GetModuleHandleA("msvcr120d.dll"));
#if defined(_M_IX86) && defined(_MSC_VER) #if defined(_M_IX86) && defined(_MSC_VER)
if (!mozilla::IsXPSP3OrLater()) { if (!mozilla::IsWin2003OrLater()) {
NtdllIntercept.Init("ntdll.dll"); // Test for the export because we can't trust the SP version (bug 1137609)
NtdllIntercept.AddHook("RtlImageNtHeader", HMODULE kernel = GetModuleHandleA("kernel32.dll");
reinterpret_cast<intptr_t>(patched_RtlImageNtHeader), if (!kernel || !GetProcAddress(kernel, "GetLogicalProcessorInformation")) {
reinterpret_cast<void**>(&stub_RtlImageNtHeader)); NtdllIntercept.Init("ntdll.dll");
NtdllIntercept.AddHook("RtlImageNtHeader",
reinterpret_cast<intptr_t>(patched_RtlImageNtHeader),
reinterpret_cast<void**>(&stub_RtlImageNtHeader));
}
} }
#endif #endif
} }