mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix some implicit conversion warnings
This commit is contained in:
parent
196499da73
commit
55118d90ca
@ -2496,6 +2496,8 @@ base64_encode(char *dest, size_t destlen, const char *src, size_t srclen,
|
||||
return -1;
|
||||
if (destlen > SIZE_T_CEILING)
|
||||
return -1;
|
||||
if (enclen > INT_MAX)
|
||||
return -1;
|
||||
|
||||
memset(dest, 0, enclen);
|
||||
|
||||
@ -2576,7 +2578,7 @@ base64_encode(char *dest, size_t destlen, const char *src, size_t srclen,
|
||||
|
||||
*d++ = '\0'; /* NUL terminate the output. */
|
||||
|
||||
return enclen;
|
||||
return (int) enclen;
|
||||
}
|
||||
|
||||
#undef BASE64_OPENSSL_LINELEN
|
||||
|
@ -614,7 +614,7 @@ base64_encode_evp(char *dest, char *src, size_t srclen)
|
||||
int len, ret;
|
||||
|
||||
EVP_EncodeInit(&ctx);
|
||||
EVP_EncodeUpdate(&ctx, (unsigned char *)dest, &len, s, srclen);
|
||||
EVP_EncodeUpdate(&ctx, (unsigned char *)dest, &len, s, (int)srclen);
|
||||
EVP_EncodeFinal(&ctx, (unsigned char *)(dest + len), &ret);
|
||||
return ret+ len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user