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:
@@ -88,6 +88,11 @@ gss_init_sec_context(OM_uint32 * minor_status,
|
|||||||
* Find the MN for this mechanism.
|
* Find the MN for this mechanism.
|
||||||
*/
|
*/
|
||||||
mn = _gss_find_mn(name, mech_type);
|
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.
|
* If we have a cred, find the cred for this mechanism.
|
||||||
|
Reference in New Issue
Block a user