diff options
author | dartraiden <wowemuh@gmail.com> | 2018-07-12 17:33:14 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2018-07-12 17:33:33 +0300 |
commit | 999189ba4ced57191426de757f7153ec69f24154 (patch) | |
tree | e7b4e3bb4daab32c0a84a0519eee9d068f9b3422 /libs/libcurl/src/vauth/digest.c | |
parent | 7be9f6e39f0adafa7a70c7521f31e14f60eaac2c (diff) |
libcurl: update to 7.61
Diffstat (limited to 'libs/libcurl/src/vauth/digest.c')
-rw-r--r-- | libs/libcurl/src/vauth/digest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/libcurl/src/vauth/digest.c b/libs/libcurl/src/vauth/digest.c index 131d9da8c4..cc6f16972a 100644 --- a/libs/libcurl/src/vauth/digest.c +++ b/libs/libcurl/src/vauth/digest.c @@ -158,7 +158,7 @@ static void auth_digest_sha256_to_ascii(unsigned char *source, /* 32 bytes */ /* Perform quoted-string escaping as described in RFC2616 and its errata */ static char *auth_digest_string_quoted(const char *source) { - char *dest, *d; + char *dest; const char *s = source; size_t n = 1; /* null terminator */ @@ -173,8 +173,8 @@ static char *auth_digest_string_quoted(const char *source) dest = malloc(n); if(dest) { + char *d = dest; s = source; - d = dest; while(*s) { if(*s == '"' || *s == '\\') { *d++ = '\\'; @@ -696,7 +696,6 @@ static CURLcode _Curl_auth_create_digest_http_message( unsigned char ha1[65]; /* 64 digits and 1 zero byte */ unsigned char ha2[65]; /* 64 digits and 1 zero byte */ char userh[65]; - char cnoncebuf[33]; char *cnonce = NULL; size_t cnonce_sz = 0; char *userp_quoted; @@ -707,6 +706,7 @@ static CURLcode _Curl_auth_create_digest_http_message( digest->nc = 1; if(!digest->cnonce) { + char cnoncebuf[33]; result = Curl_rand_hex(data, (unsigned char *)cnoncebuf, sizeof(cnoncebuf)); if(result) |