Windows: Construct paths for LoadLibrary with backslashes

Mixing forward and backslashes is confusing.  Use the expected
backslashes.

Change-Id: Ia775c73eca430138f677decc1975aad0a401fc53
This commit is contained in:
Jeffrey Altman
2013-09-13 21:45:54 -04:00
parent a7c9497c5d
commit 9f2a06a80e

View File

@@ -328,6 +328,7 @@ _krb5_load_plugins(krb5_context context, const char *name, const char **paths)
if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0')))
continue;
ret = 0;
#ifdef _WIN32
/*
* On Windows, plugins must be loaded from the same directory as
@@ -342,10 +343,12 @@ _krb5_load_plugins(krb5_context context, const char *name, const char **paths)
ext = strrchr(n, '.');
if (ext == NULL || stricmp(ext, ".dll"))
continue;
ret = asprintf(&path, "%s\\%s", dirname, n);
if (ret < 0 || path == NULL)
continue;
}
#endif
ret = 0;
#ifdef __APPLE__
{ /* support loading bundles on MacOS */
size_t len = strlen(n);