diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c index 23572683..870bb0a2 100644 --- a/src/pki_gcrypt.c +++ b/src/pki_gcrypt.c @@ -315,7 +315,7 @@ static int privatekey_decrypt(int algo, int mode, unsigned int key_len, if (gcry_cipher_open(&cipher, algo, mode, 0) || gcry_cipher_setkey(cipher, key, key_len) || gcry_cipher_setiv(cipher, iv, iv_len) - || (tmp = calloc(ssh_buffer_get_len(data), sizeof(char))) == NULL + || (tmp = calloc(ssh_buffer_get_len(data), sizeof(unsigned char))) == NULL || gcry_cipher_decrypt(cipher, tmp, ssh_buffer_get_len(data), ssh_buffer_get(data), ssh_buffer_get_len(data))) { gcry_cipher_close(cipher);