diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-17 17:54:39 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-10-17 17:54:39 +0200 |
commit | a479b302983aae2878af0cb50eac141ede6cd942 (patch) | |
tree | 1c0c240729ea4bc1753a5720fe20f6a1ae2c87b7 | |
parent | 86620fc9914b7a2a558bdc20148fd4b898bbda4b (diff) | |
download | libssh-a479b302983aae2878af0cb50eac141ede6cd942.tar.gz libssh-a479b302983aae2878af0cb50eac141ede6cd942.tar.xz libssh-a479b302983aae2878af0cb50eac141ede6cd942.zip |
Verify existence of callback before using them
-rw-r--r-- | libssh/keyfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index 1fff444..2fe6e8a 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -692,7 +692,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename, break; case TYPE_RSA: if (passphrase == NULL) { - if (session->callbacks->auth_function) { + if (session->callbacks && session->callbacks->auth_function) { auth_cb = session->callbacks->auth_function; auth_ud = session->callbacks->userdata; #ifdef HAVE_LIBGCRYPT |