mirror of
https://github.com/curl/curl.git
synced 2026-07-26 06:27:32 +03:00
curlx_base64_encode: use uint8_t* for input
Change `inputbuff` parameter from `const char *` to `const uint8_t *` to reflect the binary nature of the input bytes. Half the code was casting unsigned char to signed already in calling. Closes #19722
This commit is contained in:
parent
fd5a117a67
commit
bbb929112b
19 changed files with 33 additions and 30 deletions
|
|
@ -159,7 +159,7 @@ static CURLcode tool_ssls_exp(CURL *easy, void *userptr,
|
|||
"# This file was generated by libcurl! Edit at your own risk.\n",
|
||||
ctx->fp);
|
||||
|
||||
r = curlx_base64_encode((const char *)shmac, shmac_len, &enc, &enc_len);
|
||||
r = curlx_base64_encode(shmac, shmac_len, &enc, &enc_len);
|
||||
if(r)
|
||||
goto out;
|
||||
r = CURLE_WRITE_ERROR;
|
||||
|
|
@ -168,7 +168,7 @@ static CURLcode tool_ssls_exp(CURL *easy, void *userptr,
|
|||
if(EOF == fputc(':', ctx->fp))
|
||||
goto out;
|
||||
tool_safefree(enc);
|
||||
r = curlx_base64_encode((const char *)sdata, sdata_len, &enc, &enc_len);
|
||||
r = curlx_base64_encode(sdata, sdata_len, &enc, &enc_len);
|
||||
if(r)
|
||||
goto out;
|
||||
r = CURLE_WRITE_ERROR;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ static ParameterError varfunc(char *c, /* content */
|
|||
if(clen) {
|
||||
char *enc;
|
||||
size_t elen;
|
||||
CURLcode result = curlx_base64_encode(c, clen, &enc, &elen);
|
||||
CURLcode result = curlx_base64_encode((uint8_t *)c, clen, &enc, &elen);
|
||||
if(result) {
|
||||
err = PARAM_NO_MEM;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue