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:
		| @@ -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'))) | 	    if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0'))) | ||||||
| 		continue; | 		continue; | ||||||
|  |  | ||||||
|  | 	    ret = 0; | ||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
| 	    /* | 	    /* | ||||||
| 	     * On Windows, plugins must be loaded from the same directory as | 	     * 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, '.'); | 		ext = strrchr(n, '.'); | ||||||
| 		if (ext == NULL || stricmp(ext, ".dll")) | 		if (ext == NULL || stricmp(ext, ".dll")) | ||||||
| 		     continue; | 		     continue; | ||||||
|  |  | ||||||
|  | 		ret = asprintf(&path, "%s\\%s", dirname, n); | ||||||
|  | 		if (ret < 0 || path == NULL) | ||||||
|  | 		    continue; | ||||||
| 	    } | 	    } | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| 	    ret = 0; |  | ||||||
| #ifdef __APPLE__ | #ifdef __APPLE__ | ||||||
| 	    { /* support loading bundles on MacOS */ | 	    { /* support loading bundles on MacOS */ | ||||||
| 		size_t len = strlen(n); | 		size_t len = strlen(n); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeffrey Altman
					Jeffrey Altman