mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:dsdb:mod:operational: use NUMERIC_CMP in pso_compare
prec_{1,2} are uint32_t, and if one is not set we are defaulting to 0xffffffff (a.k.a UINT32_MAX), so an overflow when cast to int seems extremely likely. 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
a6d76d6ee9
commit
623adcf4aa
@ -1071,7 +1071,7 @@ static int pso_compare(struct ldb_message **m1, struct ldb_message **m2)
|
||||
|
||||
return ndr_guid_compare(&guid1, &guid2);
|
||||
} else {
|
||||
return prec1 - prec2;
|
||||
return NUMERIC_CMP(prec1, prec2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user