diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-06-24 15:42:06 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-06-24 15:42:06 +0200 |
commit | 105f79b489d5128ffda50d80fbdcccd8645fe788 (patch) | |
tree | 9595f1def2f5a243342ceed8c5b703f76904dde3 /winsup/cygwin/autoload.cc | |
parent | 807a628ec6e2be78c58c0ea2e1c46cfc9f43c875 (diff) | |
download | cygnal-105f79b489d5128ffda50d80fbdcccd8645fe788.tar.gz cygnal-105f79b489d5128ffda50d80fbdcccd8645fe788.tar.bz2 cygnal-105f79b489d5128ffda50d80fbdcccd8645fe788.zip |
Drop use_dont_resolve_hack flag
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/autoload.cc')
-rw-r--r-- | winsup/cygwin/autoload.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 5c8dcd8e3..d8e6e794c 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -332,31 +332,17 @@ union retchain /* This function handles the problem described here: http://www.microsoft.com/technet/security/advisory/2269637.mspx - https://msdn.microsoft.com/library/ff919712 - - It also contains a workaround for the problem reported here: - http://cygwin.com/ml/cygwin/2011-02/msg00552.html - and discussed here: - http://cygwin.com/ml/cygwin-developers/2011-02/threads.html#00007 - - To wit: winmm.dll calls FreeLibrary in its DllMain and that can result - in LoadLibraryExW returning an ERROR_INVALID_ADDRESS. */ + https://msdn.microsoft.com/library/ff919712 */ static __inline bool dll_load (HANDLE& handle, PWCHAR name) { HANDLE h = NULL; WCHAR dll_path[MAX_PATH]; - /* If that failed, try loading with full path, which sometimes - fails for no good reason. */ + /* Try loading with full path, which sometimes fails for no good reason. */ wcpcpy (wcpcpy (dll_path, windows_system_directory), name); h = LoadLibraryW (dll_path); - /* If that failed according to the second problem outlined in the - comment preceeding this function. */ - if (!h && handle && wincap.use_dont_resolve_hack () - && GetLastError () == ERROR_INVALID_ADDRESS) - h = LoadLibraryExW (dll_path, NULL, DONT_RESOLVE_DLL_REFERENCES); - /* Last resort: Try loading just by name. */ + /* If it failed, try loading just by name. */ if (!h) h = LoadLibraryW (name); if (!h) |