diff options
Diffstat (limited to 'Utilities/cmcurl/lib/curl_ntlm_core.c')
-rw-r--r-- | Utilities/cmcurl/lib/curl_ntlm_core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/curl_ntlm_core.c b/Utilities/cmcurl/lib/curl_ntlm_core.c index 38e193c186..690f8f7674 100644 --- a/Utilities/cmcurl/lib/curl_ntlm_core.c +++ b/Utilities/cmcurl/lib/curl_ntlm_core.c @@ -186,9 +186,9 @@ static void setup_des_key(const unsigned char *key_56, #elif defined(USE_NSS) /* - * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using - * the expanded key. The caller is responsible for giving 64 bit of valid - * data is IN and (at least) 64 bit large buffer as OUT. + * encrypt_des() expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of + * data, using the expanded key. IN should point to 64 bits of source data, + * OUT to a 64 bit output buffer. */ static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) @@ -658,7 +658,8 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, LONGQUARTET(tw.dwLowDateTime), LONGQUARTET(tw.dwHighDateTime)); memcpy(ptr + 32, challenge_client, 8); - memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); + if(ntlm->target_info_len) + memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); /* Concatenate the Type 2 challenge with the BLOB and do HMAC MD5 */ memcpy(ptr + 8, &ntlm->nonce[0], 8); |