From ae8d310620bdca3bc54ca9ffc57ed18677c01d97 Mon Sep 17 00:00:00 2001 From: dfr Date: Wed, 30 Apr 2008 11:25:34 +0000 Subject: [PATCH] Allow null oids in _gss_oid_equal(). MFC after: 2 weeks --- lib/libgssapi/gss_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libgssapi/gss_utils.c b/lib/libgssapi/gss_utils.c index 6243df8acc56..1f8dfab9fe6d 100644 --- a/lib/libgssapi/gss_utils.c +++ b/lib/libgssapi/gss_utils.c @@ -36,6 +36,11 @@ int _gss_oid_equal(const gss_OID oid1, const gss_OID oid2) { + + if (oid1 == oid2) + return (1); + if (!oid1 || !oid2) + return (0); if (oid1->length != oid2->length) return (0); if (memcmp(oid1->elements, oid2->elements, oid1->length))