diff options
author | Max Khon <fjoe@samodelkin.net> | 2016-12-28 18:10:59 +0600 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-12-29 00:21:14 +0100 |
commit | 89b789884680134d5090c6de2e6b621e908b1902 (patch) | |
tree | 8056b0a41461dd55a49a85f8e5e2a3cad452b203 /lib/vauth | |
parent | 0128925de5e49bcf3976bde7da31765d2c06a99d (diff) | |
download | curl-89b789884680134d5090c6de2e6b621e908b1902.tar.gz |
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
Diffstat (limited to 'lib/vauth')
-rw-r--r-- | lib/vauth/digest_sspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |