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()
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
5150b318f4
commit
75e51bd99b
@ -1197,7 +1197,7 @@ int ldb_dn_compare(struct ldb_dn *dn0, struct ldb_dn *dn1)
|
||||
|
||||
/* compare attr.cf_value. */
|
||||
if (dn0_vlen != dn1_vlen) {
|
||||
return dn0_vlen - dn1_vlen;
|
||||
return NUMERIC_CMP(dn0_vlen, dn1_vlen);
|
||||
}
|
||||
ret = strncmp(dn0_vdata, dn1_vdata, dn0_vlen);
|
||||
if (ret != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user