Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-28 15:22:37 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-08-28 15:22:37 +0400
commit71d8f118da24bb5a31f406e5fba222a324913b05 (patch)
tree093f51ed610d7333e4a933f68a1ee8900f5438bb /winsup/utils/ldh.cc
parent893a8b78fca52a5474fbca9a0b881b622afc5044 (diff)
* loadlib.h: New header implementing safe LoadLibrary calls.
Include throughout files using LoadLibrary function. * cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via GetModuleHandle, rather than using LoadLibrary. * cygpath.cc (get_long_name): Ditto. (do_sysfolders): Append .dll suffix in LoadLibrary call. * ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES to avoid loading malicious library code. * locale.cc (print_locale_with_codeset): Change way to retrieve kernel32.dll path.
Diffstat (limited to 'winsup/utils/ldh.cc')
-rw-r--r--winsup/utils/ldh.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/utils/ldh.cc b/winsup/utils/ldh.cc
index 7bea569f0..db0449f8d 100644
--- a/winsup/utils/ldh.cc
+++ b/winsup/utils/ldh.cc
@@ -11,7 +11,7 @@ WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
cmd += 4;
break;
}
- if (!*cmd || !LoadLibraryW (cmd))
+ if (!*cmd || !LoadLibraryExW (cmd, NULL, DONT_RESOLVE_DLL_REFERENCES))
ExitProcess (0x0100);
ExitProcess (0x0000);
}