1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

crypto: Use size_t for len argument in encrypt and decrpyt fn

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-11-30 17:23:37 +01:00
parent 6d3672911b
commit c6ca62d7e1
4 changed files with 52 additions and 28 deletions

View File

@@ -708,8 +708,10 @@ error:
return SSH_ERROR;
}
static void cipher_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
unsigned long len)
static void cipher_encrypt(struct ssh_cipher_struct *cipher,
void *in,
void *out,
size_t len)
{
size_t outlen = 0;
size_t total_len = 0;
@@ -763,8 +765,10 @@ static void cipher_encrypt_cbc(struct ssh_cipher_struct *cipher, void *in, void
}
static void cipher_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
unsigned long len)
static void cipher_decrypt(struct ssh_cipher_struct *cipher,
void *in,
void *out,
size_t len)
{
size_t outlen = 0;
int rc = 0;