mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:23:39 +03:00
asyn-thread: avoid using GetAddrInfoExW with impersonation
Multiple reports suggest that GetAddrInfoExW fails when impersonation is used. This PR checks if thread is impersonating and avoids using GetAddrInfoExW api. Reported-by: Keerthi Timmaraju Assisted-by: edmcln on github Fixes #13612 Closes #13738
This commit is contained in:
parent
30de937bda
commit
0caadc1f24
3 changed files with 14 additions and 1 deletions
|
|
@ -638,7 +638,8 @@ static bool init_resolve_thread(struct Curl_easy *data,
|
|||
|
||||
#ifdef _WIN32
|
||||
if(Curl_isWindows8OrGreater && Curl_FreeAddrInfoExW &&
|
||||
Curl_GetAddrInfoExCancel && Curl_GetAddrInfoExW) {
|
||||
Curl_GetAddrInfoExCancel && Curl_GetAddrInfoExW &&
|
||||
!Curl_win32_impersonating()) {
|
||||
#define MAX_NAME_LEN 256 /* max domain name is 253 chars */
|
||||
#define MAX_PORT_LEN 8
|
||||
WCHAR namebuf[MAX_NAME_LEN];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue