Bug 1460022: Part 5 - Update launcher process to work with new DLL interceptor interface; r=mhowell

This commit is contained in:
Aaron Klotz 2018-06-27 11:49:30 -06:00
Родитель 349c64cd00
Коммит 6ed3d9c74f
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -246,7 +246,8 @@ IsDllAllowed(const UNICODE_STRING& aLeafName, void* aBaseAddress)
}
typedef decltype(&NtMapViewOfSection) NtMapViewOfSection_func;
static NtMapViewOfSection_func stub_NtMapViewOfSection;
static mozilla::CrossProcessDllInterceptor::FuncHookType<NtMapViewOfSection_func>
stub_NtMapViewOfSection;
static NTSTATUS NTAPI
patched_NtMapViewOfSection(HANDLE aSection, HANDLE aProcess, PVOID* aBaseAddress,
@ -356,9 +357,8 @@ InitializeDllBlocklistOOP(HANDLE aChildProcess)
{
mozilla::CrossProcessDllInterceptor intcpt(aChildProcess);
intcpt.Init(L"ntdll.dll");
bool ok = intcpt.AddDetour("NtMapViewOfSection",
reinterpret_cast<intptr_t>(&patched_NtMapViewOfSection),
(void**) &stub_NtMapViewOfSection);
bool ok = stub_NtMapViewOfSection.SetDetour(intcpt, "NtMapViewOfSection",
&patched_NtMapViewOfSection);
if (!ok) {
return false;
}