From 5a98f9cb35835efdfe384b82e31e319276496ef4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 Jul 2000 20:26:50 +0000 Subject: [PATCH] if the sids are not the same pointer and either of the sids are NULL then the two sids are not equal (This used to be commit 9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1) --- source3/lib/util_sid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 42fdfb15fe7..3572f2c775d 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -404,6 +404,9 @@ BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2) { int i; + if (sid1 == sid2) return True; + if (!sid1 || !sid2) return False; + /* compare most likely different rids, first: i.e start at end */ for (i = sid1->num_auths-1; i >= 0; --i) if (sid1->sub_auths[i] != sid2->sub_auths[i]) -- 2.34.1