libcli/security: Fix integer overflow
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 2 Aug 2023 02:27:31 +0000 (14:27 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Aug 2023 04:39:37 +0000 (04:39 +0000)
commitdbf53bf3d5e1cd154840b33f946a7a5c46a283af
tree376431c9a33db729d1901528b755f8264e04c2e2
parent5cf61ed2e3b217b0d1313cc7cb94a44b11ef0863
libcli/security: Fix integer overflow

On a typical machine where the size of ‘int’ is 32 bits or smaller, a
sub-authority of 2147483649 would be ordered before a sub-authority of
1, even though it is greater.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/dom_sid.c