mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-05 01:02:39 +03:00
gssapi: Free selected OID set on error paths (GHSL-2023-034)
Thanks Phil Turnbull from GitHub Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
2b5bef9c03
commit
bdabf25a5b
@@ -327,6 +327,7 @@ ssh_gssapi_handle_userauth(ssh_session session, const char *user,
|
||||
session->gssapi->mech.elements = malloc(oid.length);
|
||||
if (session->gssapi->mech.elements == NULL){
|
||||
ssh_set_error_oom(session);
|
||||
gss_release_oid_set(&min_stat, &selected);
|
||||
return SSH_ERROR;
|
||||
}
|
||||
memcpy(session->gssapi->mech.elements, oid.elements, oid.length);
|
||||
|
||||
Reference in New Issue
Block a user