svn rev #24884: trunk/src/lib/gssapi/mechglue/

ghudson@MIT.EDU ghudson at MIT.EDU
Sat Apr 16 13:30:38 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=24884
Commit By: ghudson
Log Message:
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.)



Changed Files:
U   trunk/src/lib/gssapi/mechglue/g_glue.c
Modified: trunk/src/lib/gssapi/mechglue/g_glue.c
===================================================================
--- trunk/src/lib/gssapi/mechglue/g_glue.c	2011-04-16 14:05:22 UTC (rev 24883)
+++ trunk/src/lib/gssapi/mechglue/g_glue.c	2011-04-16 17:30:38 UTC (rev 24884)
@@ -367,7 +367,8 @@
      * 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,




More information about the cvs-krb5 mailing list