diff options
Diffstat (limited to 'proxy/src/mechglue')
-rw-r--r-- | proxy/src/mechglue/gpp_acquire_cred.c | 6 | ||||
-rw-r--r-- | proxy/src/mechglue/gpp_context.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/proxy/src/mechglue/gpp_acquire_cred.c b/proxy/src/mechglue/gpp_acquire_cred.c index b3a46ec..43eca8c 100644 --- a/proxy/src/mechglue/gpp_acquire_cred.c +++ b/proxy/src/mechglue/gpp_acquire_cred.c @@ -256,6 +256,10 @@ OM_uint32 gssi_acquire_cred_with_password(OM_uint32 *minor_status, GSSI_TRACE(); + if (desired_name == GSS_C_NO_NAME) { + *minor_status = gpp_map_error(EINVAL); + return GSS_S_BAD_NAME; + } name = (struct gpp_name_handle *)desired_name; if (!output_cred_handle) { @@ -289,7 +293,7 @@ OM_uint32 gssi_acquire_cred_with_password(OM_uint32 *minor_status, goto done; } - if (name && name->remote && !name->local) { + if (name->remote && !name->local) { maj = gpp_name_to_local(&min, name->remote, name->mech_type, &name->local); if (maj) { diff --git a/proxy/src/mechglue/gpp_context.c b/proxy/src/mechglue/gpp_context.c index 90dc897..448c3e0 100644 --- a/proxy/src/mechglue/gpp_context.c +++ b/proxy/src/mechglue/gpp_context.c @@ -320,8 +320,8 @@ OM_uint32 gssi_set_sec_context_option(OM_uint32 *minor_status, GSSI_TRACE(); - if (context_handle) { - ctx = (struct gpp_context_handle *)context_handle; + if (*context_handle) { + ctx = (struct gpp_context_handle *)(*context_handle); } else { ctx = calloc(1, sizeof(struct gpp_context_handle)); if (!ctx) { |