mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ldb:ldb_dn: use safe NUMERIC_CMP in ldb_dn_compare_base()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
de1b94f79e
commit
5150b318f4
@ -1111,7 +1111,7 @@ int ldb_dn_compare_base(struct ldb_dn *base, struct ldb_dn *dn)
|
||||
|
||||
/* compare attr.cf_value. */
|
||||
if (b_vlen != dn_vlen) {
|
||||
return b_vlen - dn_vlen;
|
||||
return NUMERIC_CMP(b_vlen, dn_vlen);
|
||||
}
|
||||
ret = strncmp(b_vdata, dn_vdata, b_vlen);
|
||||
if (ret != 0) return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user