diff options
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r-- | lib/http_ntlm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 62f1e7ef2..63a1126f9 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -123,17 +123,17 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn, 32 (48) start of data block */ size_t size; - unsigned char *buffer = (unsigned char *)malloc(strlen(header)); - if (buffer == NULL) + unsigned char *buffer; + size = Curl_base64_decode(header, &buffer); + if(!buffer) return CURLNTLM_BAD; - size = Curl_base64_decode(header, (char *)buffer); - ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */ if(size >= 48) /* the nonce of interest is index [24 .. 31], 8 bytes */ memcpy(ntlm->nonce, &buffer[24], 8); + /* FIX: add an else here! */ /* at index decimal 20, there's a 32bit NTLM flag field */ |