mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
gssapi: Sanitize input parameters
Originally reported with this patch by Brian Carpenter from Deep Fork Cyber. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
This commit is contained in:
@@ -850,6 +850,10 @@ int ssh_gssapi_client_identity(ssh_session session, gss_OID_set *valid_oids)
|
|||||||
char *ptr = NULL;
|
char *ptr = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (session == NULL || session->gssapi == NULL) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (session->gssapi->client.client_deleg_creds == NULL) {
|
if (session->gssapi->client.client_deleg_creds == NULL) {
|
||||||
if (session->opts.gss_client_identity != NULL) {
|
if (session->opts.gss_client_identity != NULL) {
|
||||||
namebuf.value = (void *)session->opts.gss_client_identity;
|
namebuf.value = (void *)session->opts.gss_client_identity;
|
||||||
|
|||||||
Reference in New Issue
Block a user