diff options
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r-- | src/pki_gcrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c index 025ff1b9..713c035f 100644 --- a/src/pki_gcrypt.c +++ b/src/pki_gcrypt.c @@ -314,7 +314,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 = malloc(ssh_buffer_get_len(data) * sizeof (char))) == NULL + || (tmp = calloc(ssh_buffer_get_len(data), sizeof(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); |