ntlm: copy NTLM_HOSTNAME to host buffer

Commit 709ae2454f added a fake hostname to avoid leaking the local
hostname, but omitted copying it to the host buffer.  Fix by copying
and adjust the test fallout.

Closes: #8895
Fixes: #8893
Reported-by: Patrick Monnerat <patrick@monnerat.net>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
Daniel Gustafsson 2022-05-22 23:26:24 +02:00
parent 5b9770e5fc
commit 5a41abef6d
35 changed files with 53 additions and 52 deletions

View file

@ -536,6 +536,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
hostlen = strlen(host);
}
#else
msnprintf(host, sizeof(host), "%s", NTLM_HOSTNAME);
hostlen = sizeof(NTLM_HOSTNAME)-1;
#endif