digest_sspi: copy terminating NUL as well

Curl_auth_decode_digest_http_message(): copy terminating NUL as later
Curl_override_sspi_http_realm() expects a NUL-terminated string.

Fixes #1180
This commit is contained in:
Max Khon 2016-12-28 18:10:59 +06:00 committed by Daniel Stenberg
parent 0128925de5
commit 89b7898846

View File

@ -341,7 +341,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
return CURLE_BAD_CONTENT_ENCODING;
/* Simply store the challenge for use later */
digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen);
digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen + 1);
if(!digest->input_token)
return CURLE_OUT_OF_MEMORY;