mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
Fix segfault when ssh_userauth_kbdint_setanswer() has not been called
(cherry picked from commit b6e712e934)
This commit is contained in:
@@ -1599,6 +1599,11 @@ static int kbdauth_send(ssh_session session) {
|
||||
|
||||
enter_function();
|
||||
|
||||
if(session==NULL || session->kbdint == NULL
|
||||
|| session->kbdint->answers == NULL) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (buffer_add_u8(session->out_buffer, SSH2_MSG_USERAUTH_INFO_RESPONSE) < 0 ||
|
||||
buffer_add_u32(session->out_buffer,
|
||||
htonl(session->kbdint->nprompts)) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user