1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

Delay the check for kbdint->answers in kbdint_send()

This commit is contained in:
milo
2011-05-02 18:02:56 +02:00
parent b6e712e934
commit 32ba5204b7

View File

@@ -1828,8 +1828,7 @@ static int kbdauth_send(ssh_session session) {
enter_function(); enter_function();
if(session==NULL || session->kbdint == NULL if(session==NULL || session->kbdint == NULL) {
|| session->kbdint->answers == NULL) {
return rc; return rc;
} }
@@ -1841,7 +1840,7 @@ static int kbdauth_send(ssh_session session) {
} }
for (i = 0; i < session->kbdint->nprompts; i++) { 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]); answer = ssh_string_from_char(session->kbdint->answers[i]);
} else { } else {
answer = ssh_string_from_char(""); answer = ssh_string_from_char("");