From: Greg Hudson Date: Sat, 16 Apr 2011 18:10:23 +0000 (+0000) Subject: Handle null OID values in gss_oid_equal() X-Git-Tag: krb5-1.10-alpha1~464 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c532a052aa946d3349fac8b7998fea2d1ea91f98;p=krb5.git Handle null OID values in gss_oid_equal() ticket: 6890 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24885 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_oid_ops.c b/src/lib/gssapi/mechglue/g_oid_ops.c index d750368ea..e0be538cc 100644 --- a/src/lib/gssapi/mechglue/g_oid_ops.c +++ b/src/lib/gssapi/mechglue/g_oid_ops.c @@ -108,5 +108,8 @@ gss_oid_equal( gss_const_OID first_oid, gss_const_OID second_oid) { + /* GSS_C_NO_OID doesn't match itself, per draft-josefsson-gss-capsulate. */ + if (first_oid == GSS_C_NO_OID || second_oid == GSS_C_NO_OID) + return 0; return g_OID_equal(first_oid, second_oid); }