aboutsummaryrefslogtreecommitdiff
path: root/libssh/keyfiles.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-10-17 17:54:39 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-10-17 17:54:39 +0200
commita479b302983aae2878af0cb50eac141ede6cd942 (patch)
tree1c0c240729ea4bc1753a5720fe20f6a1ae2c87b7 /libssh/keyfiles.c
parent86620fc9914b7a2a558bdc20148fd4b898bbda4b (diff)
downloadlibssh-a479b302983aae2878af0cb50eac141ede6cd942.tar.gz
libssh-a479b302983aae2878af0cb50eac141ede6cd942.tar.xz
libssh-a479b302983aae2878af0cb50eac141ede6cd942.zip
Verify existence of callback before using them
Diffstat (limited to 'libssh/keyfiles.c')
-rw-r--r--libssh/keyfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index 1fff4443..2fe6e8aa 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