mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
gssapi: add null checks for session->gssapi before using it
These are not strictly necessary because we always check that we performed GSSAPI KEX, but they won't hurt us. Signed-off-by: Pavol Žáčik <pzacik@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -2501,6 +2501,11 @@ int ssh_userauth_gssapi_keyex(ssh_session session)
|
||||
return SSH_ERROR;
|
||||
}
|
||||
|
||||
if (session->gssapi == NULL) {
|
||||
ssh_set_error(session, SSH_FATAL, "GSSAPI context not initialized");
|
||||
return SSH_ERROR;
|
||||
}
|
||||
|
||||
rc = ssh_userauth_request_service(session);
|
||||
if (rc == SSH_AGAIN) {
|
||||
return SSH_AUTH_AGAIN;
|
||||
|
||||
Reference in New Issue
Block a user