diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c index cb140111..c8386bc1 100644 --- a/src/session_server_ssh.c +++ b/src/session_server_ssh.c @@ -1094,7 +1094,7 @@ nc_server_ssh_create_ssh_pubkey(const char *base64, ssh_key *key) static int auth_pubkey_compare_key(ssh_key key, struct nc_auth_client *auth_client) { - uint16_t i, pubkey_count; + uint16_t i, pubkey_count = 0; int ret = 0; ssh_key new_key = NULL; struct nc_public_key *pubkeys = NULL; diff --git a/tests/test_client_ssh.c b/tests/test_client_ssh.c index dafdb9d2..571b844d 100644 --- a/tests/test_client_ssh.c +++ b/tests/test_client_ssh.c @@ -370,7 +370,7 @@ test_nc_client_ssh_adding_keypair(void **state) { (void)state; int ret; - const char *pubkey1, *pubkey2; + const char *pubkey1 = NULL, *pubkey2 = NULL; /* at the beginning keypair count should be 0 */ ret = nc_client_ssh_get_keypair_count();