If the desired mechanism can't convert the name to a MN, fail with

GSS_S_BAD_NAME rather then a NULL de-reference.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17812 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-07-06 22:30:09 +00:00
parent fd78f09696
commit 07b69b1028

View File

@@ -88,6 +88,11 @@ gss_init_sec_context(OM_uint32 * minor_status,
* Find the MN for this mechanism.
*/
mn = _gss_find_mn(name, mech_type);
if (mn == NULL) {
if (allocated_ctx)
free(ctx);
return GSS_S_BAD_NAME;
}
/*
* If we have a cred, find the cred for this mechanism.