From: Kamen Mazdrashki Date: Sat, 8 May 2010 07:19:14 +0000 (+0300) Subject: s4/dn: handle case 'base' dn has no components X-Git-Tag: samba-3.6.0pre1~2109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f3faea0463782d16bdbfd34b3b51624aca2bc90;p=thirdparty%2Fsamba.git s4/dn: handle case 'base' dn has no components This could if the 'base' dn is special for example. --- diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index d91e9d9fa9b..00646f6ba54 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -1065,7 +1065,7 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn) return (dn->comp_num - base->comp_num); } - if (dn->comp_num == 0) { + if ((dn->comp_num == 0) || (base->comp_num == 0)) { if (dn->special && base->special) { return strcmp(base->linearized, dn->linearized); } else if (dn->special) {