[setup - the official Cygwin setup program] branch master, updated. release_2.929-1-g86c0ada12dce
Corinna Vinschen via Cygwin-apps-cvs <[email protected]> Mon, 5 Feb 2024 20:49:47 +0000 (GMT)
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=86c0ada12dce4403a9b796380fde9e5c1824734f commit 86c0ada12dce4403a9b796380fde9e5c1824734f Author: Corinna Vinschen <[email protected]> Date: Mon Feb 5 21:47:46 2024 +0100 Disallow DLL loading from other than C:\Windows\System32 Call SetDefaultDllDirectories early to make sure, delay-loaded DLLs are only loaded from the System32 dir. Diff: --- main.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cc b/main.cc index 198a943e0859..b570c6cb18ec 100644 --- a/main.cc +++ b/main.cc @@ -225,9 +225,11 @@ int WINAPI WinMain (HINSTANCE h, HINSTANCE hPrevInstance, LPSTR command_line, int cmd_show) { - hinstance = h; + // Make sure Windows DLLs only delay-load further DLLs from System32 + SetDefaultDllDirectories (LOAD_LIBRARY_SEARCH_SYSTEM32); + // Make sure the C runtime functions use the same codepage as the GUI char locale[12]; snprintf(locale, sizeof locale, ".%u", GetACP());