mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
auth: Avoid memory on error in ssh_userauth_agent_publickey()
CID 1401095 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -757,6 +757,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
|
|||||||
if (sig_type_c == NULL) {
|
if (sig_type_c == NULL) {
|
||||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||||
"Invalid key type (unknown)");
|
"Invalid key type (unknown)");
|
||||||
|
SSH_STRING_FREE(pubkey_s);
|
||||||
return SSH_AUTH_DENIED;
|
return SSH_AUTH_DENIED;
|
||||||
}
|
}
|
||||||
if (!ssh_key_algorithm_allowed(session, sig_type_c)) {
|
if (!ssh_key_algorithm_allowed(session, sig_type_c)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user