From 89b789884680134d5090c6de2e6b621e908b1902 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Wed, 28 Dec 2016 18:10:59 +0600 Subject: 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 --- lib/vauth/digest_sspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c index b9ceb12a9..6f0746fc4 100644 --- a/lib/vauth/digest_sspi.c +++ b/lib/vauth/digest_sspi.c @@ -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; -- cgit v1.2.3