diff options
author | dfr <dfr@FreeBSD.org> | 2008-04-30 11:25:34 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-04-30 11:25:34 +0000 |
commit | ae8d310620bdca3bc54ca9ffc57ed18677c01d97 (patch) | |
tree | faaffee34a24a1d9f91f3eb63282fc91fe8073dc /lib/libgssapi/gss_utils.c | |
parent | fd0e2b332ee8ca7dc42768293f0fd7a9ead5fd71 (diff) | |
download | FreeBSD-src-ae8d310620bdca3bc54ca9ffc57ed18677c01d97.zip FreeBSD-src-ae8d310620bdca3bc54ca9ffc57ed18677c01d97.tar.gz |
Allow null oids in _gss_oid_equal().
MFC after: 2 weeks
Diffstat (limited to 'lib/libgssapi/gss_utils.c')
-rw-r--r-- | lib/libgssapi/gss_utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libgssapi/gss_utils.c b/lib/libgssapi/gss_utils.c index 6243df8..1f8dfab 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)) |