aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-07-25 12:01:16 +0200
committerJakub Jelen <jjelen@redhat.com>2019-08-08 09:44:54 +0200
commit99dc2002b92c179cc7e9147c2db0acce0834ef27 (patch)
treed287bb2e9b69fe50c8d05444963011a02a610b70
parent878d8320c1b405d4437d12d28807873bbd326256 (diff)
downloadlibssh-99dc2002b92c179cc7e9147c2db0acce0834ef27.tar.gz
libssh-99dc2002b92c179cc7e9147c2db0acce0834ef27.tar.xz
libssh-99dc2002b92c179cc7e9147c2db0acce0834ef27.zip
libcrypto: Avoid incompatible pointers
Fixes: T164 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit e42d44e48a913a03e42d45063718fa5a77c58b8d)
-rw-r--r--src/libcrypto.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 24ef07d3..9ef00cb7 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -686,8 +686,12 @@ static int aes_ctr_set_key(struct ssh_cipher_struct *cipher, void *key,
return SSH_OK;
}
-static void aes_ctr_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
- unsigned long len) {
+static void
+aes_ctr_encrypt(struct ssh_cipher_struct *cipher,
+ void *in,
+ void *out,
+ size_t len)
+{
unsigned char tmp_buffer[AES_BLOCK_SIZE];
unsigned int num=0;
/* Some things are special with ctr128 :