summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/mechglue/g_glue.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-04-16 17:30:38 +0000
committerGreg Hudson <ghudson@mit.edu>2011-04-16 17:30:38 +0000
commit973b9a998b8d3259ce53c12368da976bf0db532a (patch)
tree4305998852c86b100255dce7c6a8ad7cd0255be5 /src/lib/gssapi/mechglue/g_glue.c
parentc41992eec7df41c0232de45ef19267a21b66dcaa (diff)
downloadkrb5-973b9a998b8d3259ce53c12368da976bf0db532a.tar.gz
krb5-973b9a998b8d3259ce53c12368da976bf0db532a.tar.xz
krb5-973b9a998b8d3259ce53c12368da976bf0db532a.zip
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
Diffstat (limited to 'src/lib/gssapi/mechglue/g_glue.c')
-rw-r--r--src/lib/gssapi/mechglue/g_glue.c3
1 files changed, 2 insertions, 1 deletions
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,