aboutsummaryrefslogtreecommitdiff
path: root/src/auth.c
diff options
context:
space:
mode:
authormilo <milo@r0ot.me>2011-05-02 18:02:56 +0200
committermilo <milo@r0ot.me>2011-05-02 18:02:56 +0200
commit32ba5204b77906efa5613863c34fa916e7a83217 (patch)
tree28c166ad547132b07eb63cb65fd546b0e655a701 /src/auth.c
parentb6e712e934a45981b3a12cb67b48df006402a4d7 (diff)
downloadlibssh-32ba5204b77906efa5613863c34fa916e7a83217.tar.gz
libssh-32ba5204b77906efa5613863c34fa916e7a83217.tar.xz
libssh-32ba5204b77906efa5613863c34fa916e7a83217.zip
Delay the check for kbdint->answers in kbdint_send()
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 67376781..1b929426 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1828,8 +1828,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;
}
@@ -1841,7 +1840,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("");