diff options
| author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-03-28 21:19:12 +0200 |
|---|---|---|
| committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-03-28 21:19:12 +0200 |
| commit | 3b6098597d4548d8f1ad2401d834a70f9448960a (patch) | |
| tree | 26fdc58a56e2b7f9a521a963a8fe724d95e169ee /libssh | |
| parent | 964d8fdc112533c12e98cb456d07aadecb3b7002 (diff) | |
Fix crash when no callback is defined
Diffstat (limited to 'libssh')
| -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 af6fee13..af49484f 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; |
