From f503c4a3e171539331b792e0c46caa28e7a679a0 Mon Sep 17 00:00:00 2001 From: milo Date: Mon, 2 May 2011 18:02:56 +0200 Subject: Delay the check for kbdint->answers in kbdint_send() (cherry picked from commit 32ba5204b77906efa5613863c34fa916e7a83217) --- src/auth.c | 5 ++--- 1 file 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(""); -- cgit