summaryrefslogtreecommitdiffstats
path: root/src/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/auth.c b/src/auth.c
index 8d795a46..32a708f7 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1599,8 +1599,7 @@ static int kbdauth_send(ssh_session session) {
enter_function();
- if(session==NULL || session->kbdint == NULL
- || session->kbdint->answers == NULL) {
+ if(session==NULL || session->kbdint == NULL) {
return rc;
}
@@ -1612,7 +1611,7 @@ static int kbdauth_send(ssh_session session) {
}
for (i = 0; i < session->kbdint->nprompts; i++) {
- if (session->kbdint->answers[i]) {
+ if (session->kbdint->answers && session->kbdint->answers[i]) {
answer = ssh_string_from_char(session->kbdint->answers[i]);
} else {
answer = ssh_string_from_char("");