Skip to content

Commit

Permalink
Bug 1410073: Load user32.dll immediately after the DLL Blocklist is i…
Browse files Browse the repository at this point in the history
…n place. r=aklotz

This is to reduce the chance of it being loaded on an injected thread.
  • Loading branch information
bobowen committed Oct 19, 2017
1 parent 6e7d4d6 commit 75a8563
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mozglue/build/WindowsDllBlocklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,13 @@ DllBlocklist_Initialize(uint32_t aInitFlags)
#endif
}

// If someone injects a thread early that causes user32.dll to load off the
// main thread this causes issues, so load it as soon as we've initialized
// the block-list. (See bug 1400637)
if (!sUser32BeforeBlocklist) {
::LoadLibraryW(L"user32.dll");
}

Kernel32Intercept.Init("kernel32.dll");

#ifdef _M_AMD64
Expand Down

0 comments on commit 75a8563

Please sign in to comment.