mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Don't segfault if the session or the answer is NULL.
This commit is contained in:
@@ -1475,7 +1475,7 @@ const char *ssh_userauth_kbdint_getprompt(SSH_SESSION *session, unsigned int i,
|
||||
*/
|
||||
int ssh_userauth_kbdint_setanswer(SSH_SESSION *session, unsigned int i,
|
||||
const char *answer) {
|
||||
if (i > session->kbdint->nprompts) {
|
||||
if (session == NULL || answer == NULL || i > session->kbdint->nprompts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user