Allow null oids in _gss_oid_equal().

MFC after: 2 weeks
This commit is contained in:
Doug Rabson 2008-04-30 11:25:34 +00:00
parent 5c1eb1ac80
commit 733704ea52
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178689

View File

@ -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))