mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Delay the check for kbdint->answers in kbdint_send()
(cherry picked from commit 32ba5204b7)
This commit is contained in:
@@ -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("");
|
||||
|
||||
Reference in New Issue
Block a user