aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorVic Lee <llyzs@163.com>2009-10-05 14:07:33 +0800
committerAris Adamantiadis <aris@0xbadc0de.be>2009-10-05 10:02:04 +0200
commit6063a8d09c8f1b9235f511fb61e9fbffcaefdcd8 (patch)
treed665beeeffdaf2e66b0bb92be6f69fdb0b27714a /libssh
parent40778d4ba94ab5bfbe71bd3a304d6664c9a02560 (diff)
downloadlibssh-6063a8d09c8f1b9235f511fb61e9fbffcaefdcd8.tar.gz
libssh-6063a8d09c8f1b9235f511fb61e9fbffcaefdcd8.tar.xz
libssh-6063a8d09c8f1b9235f511fb61e9fbffcaefdcd8.zip
Fix a segment fault in privatekey_from_file
Signed-off-by: Vic Lee <llyzs@163.com>
Diffstat (limited to 'libssh')
-rw-r--r--libssh/keyfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index d368a287..ac10c457 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -648,7 +648,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
ssh_log(session, SSH_LOG_RARE, "Trying to read %s, passphase=%s, authcb=%s",
filename, passphrase ? "true" : "false",
- session->callbacks->auth_function ? "true" : "false");
+ session->callbacks && session->callbacks->auth_function ? "true" : "false");
switch (type) {
case TYPE_DSS:
if (passphrase == NULL) {