]> git.ipfire.org Git - thirdparty/samba.git/commit
s4:dsdb:mod:operational: use NUMERIC_CMP in pso_compare
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 2 Apr 2024 23:55:27 +0000 (12:55 +1300)
committerJule Anger <janger@samba.org>
Mon, 10 Jun 2024 13:25:16 +0000 (13:25 +0000)
commit792f8d40e1cfe45dce9b6ddbe095d28aec8861d5
tree567e3780110b4179f1162b0c708c6de90f23c8cc
parent25e97cd7dba404f78fed6625b86fb366a1efb1da
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>
(cherry picked from commit 623adcf4aae00ac06e82d98a75ce4644890501e6)
source4/dsdb/samdb/ldb_modules/operational.c