aboutsummaryrefslogtreecommitdiff
path: root/libssh/keyfiles.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-03-28 21:19:12 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-03-28 21:58:59 +0200
commit7d49e49e74c4eed0c14e354efde832c39b2740f4 (patch)
tree1a7432870de91b724577cc84dc4d3a0e2aa9fbff /libssh/keyfiles.c
parent0689304cff86226968f3b59da69646241f8ad0cc (diff)
downloadlibssh-7d49e49e74c4eed0c14e354efde832c39b2740f4.tar.gz
libssh-7d49e49e74c4eed0c14e354efde832c39b2740f4.tar.xz
libssh-7d49e49e74c4eed0c14e354efde832c39b2740f4.zip
Fix crash when no callback is defined
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 70abbe1f..906e9847 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -677,7 +677,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
switch (type) {
case TYPE_DSS:
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;