diff options
author | milo <milo@r0ot.me> | 2011-05-02 18:02:56 +0200 |
---|---|---|
committer | milo <milo@r0ot.me> | 2011-05-02 18:04:56 +0200 |
commit | f503c4a3e171539331b792e0c46caa28e7a679a0 (patch) | |
tree | f4245827ce25e3eb3958409064dcf236084db34a | |
parent | a56c925da9be128e6c29c2dd7a6031366d6370eb (diff) | |
download | libssh-f503c4a3e171539331b792e0c46caa28e7a679a0.tar.gz libssh-f503c4a3e171539331b792e0c46caa28e7a679a0.tar.xz libssh-f503c4a3e171539331b792e0c46caa28e7a679a0.zip |
Delay the check for kbdint->answers in kbdint_send()
(cherry picked from commit 32ba5204b77906efa5613863c34fa916e7a83217)
-rw-r--r-- | src/auth.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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(""); |