mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ldb: avoid non-transitive comparison in ldb_val_cmp()
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>
(cherry picked from commit 5c36bc8241
)
This commit is contained in:
parent
7990f5a284
commit
e0468b5a9e
@ -93,7 +93,7 @@ struct ldb_val *ldb_msg_find_val(const struct ldb_message_element *el,
|
||||
static int ldb_val_cmp(const struct ldb_val *v1, const struct ldb_val *v2)
|
||||
{
|
||||
if (v1->length != v2->length) {
|
||||
return v1->length - v2->length;
|
||||
return NUMERIC_CMP(v1->length, v2->length);
|
||||
}
|
||||
return memcmp(v1->data, v2->data, v1->length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user