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

--HG--
extra : rebase_source : 6b0f7abb908993afb77f3c90b57cb870e630f778
This commit is contained in:
Aaron Klotz 2018-06-27 11:49:30 -06:00
Родитель 63e70eee76
Коммит b90ed7ab5d
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;
}