mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
auth: Set auto_state->state explicitly
When a new ssh_auth_auto_state_struct is allocated in
ssh_userauth_publickey_auto(), initialize the state explicitly for
better readability.
Fixes T194
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 7e3995d2dd)
This commit is contained in:
committed by
Andreas Schneider
parent
bab8d84d13
commit
0408d8d851
@@ -1031,6 +1031,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
||||
ssh_set_error_oom(session);
|
||||
return SSH_AUTH_ERROR;
|
||||
}
|
||||
|
||||
/* Set state explicitly */
|
||||
session->auth.auto_state->state = SSH_AUTH_AUTO_STATE_NONE;
|
||||
}
|
||||
state = session->auth.auto_state;
|
||||
if (state->state == SSH_AUTH_AUTO_STATE_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user