public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.929-1-g86c0ada12dce
@ 2024-02-05 20:49 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2024-02-05 20:49 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=86c0ada12dce4403a9b796380fde9e5c1824734f

commit 86c0ada12dce4403a9b796380fde9e5c1824734f
Author: Corinna Vinschen <corinna@vinschen.de>
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());


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-05 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 20:49 [setup - the official Cygwin setup program] branch master, updated. release_2.929-1-g86c0ada12dce Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).