From: Greg Hudson Date: Sat, 16 Apr 2011 17:30:38 +0000 (+0000) Subject: Check mech_type as well as mech_name in gssint_import_internal_name(), X-Git-Tag: krb5-1.10-alpha1~465 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=973b9a998b8d3259ce53c12368da976bf0db532a;p=krb5.git Check mech_type as well as mech_name in gssint_import_internal_name(), for the sake of static analyzers. (Also, since this is an internal function, it can be called on a half-constructed MN; checking the type alone would be insufficient.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24884 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_glue.c b/src/lib/gssapi/mechglue/g_glue.c index 1dcd14795..90febd5b9 100644 --- a/src/lib/gssapi/mechglue/g_glue.c +++ b/src/lib/gssapi/mechglue/g_glue.c @@ -367,7 +367,8 @@ gss_name_t *internal_name; * If we are importing a name for the same mechanism, and the * mechanism implements gss_duplicate_name, then use that. */ - if (union_name->mech_name != GSS_C_NO_NAME && + if (union_name->mech_type != GSS_C_NO_OID && + union_name->mech_name != GSS_C_NO_NAME && g_OID_equal(union_name->mech_type, mech_type) && mech->gss_duplicate_name != NULL) { status = mech->gss_duplicate_name(minor_status,