len = strlen(header);
if (len > 0) {
- int rawlen = Curl_base64_decode(header, &input_token.value);
+ int rawlen = Curl_base64_decode(header, (unsigned char **)&input_token.value);
if (rawlen < 0)
return -1;
input_token.length = rawlen;
input_token.length = mechTokenLength;
free(mechToken);
mechToken = NULL;
- infof(conn->data, "Parse SPNEGO Target Token succeded\n");
+ infof(conn->data, "Parse SPNEGO Target Token succeeded\n");
}
}
#endif
neg_ctx->output_token.length = spnegoTokenLength;
free(spnegoToken);
spnegoToken = NULL;
- infof(conn->data, "Make SPNEGO Initial Token succeded\n");
+ infof(conn->data, "Make SPNEGO Initial Token succeeded\n");
}
}
#endif
{
size_t len = strlen(buffer);
size_t needed_len = len + *stringlen + 1;
- unsigned char *buf64=NULL;
+ char *buf64=NULL;
if(base64) {
/* decode the given buffer first */
- len = Curl_base64_decode(buffer, &buf64); /* updated len */
+ len = Curl_base64_decode(buffer, (unsigned char**)&buf64); /* updated len */
buffer = buf64;
needed_len = len + *stringlen + 1; /* recalculate */
}
string = newptr;
*stralloc = newsize;
}
- else
+ else {
+ if(buf64)
+ free(buf64);
return NULL;
+ }
}
/* memcpy to support binary blobs */
memcpy(&string[*stringlen], buffer, len);