mirror of
https://github.com/git/git.git
synced 2026-01-18 14:44:28 +00:00
Merge branch 'mingw-load-sys-dlls'
This patch has been carried by Git for Windows for almost two years. It makes loading system libraries safer. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -1797,7 +1797,8 @@ static void ensure_socket_initialization(void)
|
||||
WSAGetLastError());
|
||||
|
||||
for (name = libraries; *name; name++) {
|
||||
ipv6_dll = LoadLibrary(*name);
|
||||
ipv6_dll = LoadLibraryExA(*name, NULL,
|
||||
LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
if (!ipv6_dll)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ static CredDeleteWT CredDeleteW;
|
||||
static void load_cred_funcs(void)
|
||||
{
|
||||
/* load DLLs */
|
||||
advapi = LoadLibrary("advapi32.dll");
|
||||
advapi = LoadLibraryExA("advapi32.dll", NULL,
|
||||
LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
if (!advapi)
|
||||
die("failed to load advapi32.dll");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user