aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
Diffstat (limited to 'libssh')
-rw-r--r--libssh/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index aadba0ba..77d4d218 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -1475,7 +1475,7 @@ const char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i,
*/
int ssh_userauth_kbdint_setanswer(SSH_SESSION *session, unsigned int i,
const char *answer) {
- if (i > session->kbdint->nprompts) {
+ if (session == NULL || answer == NULL || i > session->kbdint->nprompts) {
return -1;
}