From c532a052aa946d3349fac8b7998fea2d1ea91f98 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 16 Apr 2011 18:10:23 +0000 Subject: [PATCH] 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 --- src/lib/gssapi/mechglue/g_oid_ops.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.26.2