mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
pki_gcrypt: Do not confuse static analyzers
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
3642224ee5
commit
dd54ffb2f1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user